summaryrefslogtreecommitdiff
path: root/drivers/hwmon/fschmd.c
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2011-01-12 21:55:11 +0100
committerJean Delvare <khali@endymion.delvare>2011-01-12 21:55:11 +0100
commit1b7243e8f51157103dcca33236163a191c8afd01 (patch)
tree2253a2b45164f4d4ca9e384eb0eefa56dfb04860 /drivers/hwmon/fschmd.c
parent1ca28218eb57143d9ae6298f10c8a193696458a8 (diff)
hwmon: (fschmd) Drop useless mutex
As discussed one year ago, the WDIOC_GETSUPPORT ioctl only needs a mutex because it operates on a static variable. There is no good reason to keep this variable static, so let's just make it non-static and drop the now useless mutex altogether. See the discussion at: http://marc.info/?l=lm-sensors&m=125563869402323&w=2 Signed-off-by: Jean Delvare <khali@linux-fr.org> Cc: Hans de Goede <hdegoede@redhat.com> Acked-by: Guenter Roeck <guenter.roeck@ericsson.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'drivers/hwmon/fschmd.c')
-rw-r--r--drivers/hwmon/fschmd.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c
index d4d4ca65d371..aa6d8b686f82 100644
--- a/drivers/hwmon/fschmd.c
+++ b/drivers/hwmon/fschmd.c
@@ -49,7 +49,6 @@
#include <linux/kref.h>
/* Addresses to scan */
-static DEFINE_MUTEX(watchdog_mutex);
static const unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END };
/* Insmod parameters */
@@ -850,7 +849,7 @@ static ssize_t watchdog_write(struct file *filp, const char __user *buf,
static long watchdog_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
{
- static struct watchdog_info ident = {
+ struct watchdog_info ident = {
.options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT |
WDIOF_CARDRESET,
.identity = "FSC watchdog"
@@ -858,7 +857,6 @@ static long watchdog_ioctl(struct file *filp, unsigned int cmd, unsigned long ar
int i, ret = 0;
struct fschmd_data *data = filp->private_data;
- mutex_lock(&watchdog_mutex);
switch (cmd) {
case WDIOC_GETSUPPORT:
ident.firmware_version = data->revision;
@@ -915,7 +913,6 @@ static long watchdog_ioctl(struct file *filp, unsigned int cmd, unsigned long ar
default:
ret = -ENOTTY;
}
- mutex_unlock(&watchdog_mutex);
return ret;
}