diff options
author | Jean Delvare <khali@linux-fr.org> | 2011-01-12 15:55:11 -0500 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2011-01-12 15:55:11 -0500 |
commit | 1b7243e8f51157103dcca33236163a191c8afd01 (patch) | |
tree | 2253a2b45164f4d4ca9e384eb0eefa56dfb04860 /drivers/hwmon/fschmd.c | |
parent | 1ca28218eb57143d9ae6298f10c8a193696458a8 (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.c | 5 |
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 @@ | |||
49 | #include <linux/kref.h> | 49 | #include <linux/kref.h> |
50 | 50 | ||
51 | /* Addresses to scan */ | 51 | /* Addresses to scan */ |
52 | static DEFINE_MUTEX(watchdog_mutex); | ||
53 | static const unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END }; | 52 | static const unsigned short normal_i2c[] = { 0x73, I2C_CLIENT_END }; |
54 | 53 | ||
55 | /* Insmod parameters */ | 54 | /* Insmod parameters */ |
@@ -850,7 +849,7 @@ static ssize_t watchdog_write(struct file *filp, const char __user *buf, | |||
850 | 849 | ||
851 | static long watchdog_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) | 850 | static long watchdog_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
852 | { | 851 | { |
853 | static struct watchdog_info ident = { | 852 | struct watchdog_info ident = { |
854 | .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | | 853 | .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | |
855 | WDIOF_CARDRESET, | 854 | WDIOF_CARDRESET, |
856 | .identity = "FSC watchdog" | 855 | .identity = "FSC watchdog" |
@@ -858,7 +857,6 @@ static long watchdog_ioctl(struct file *filp, unsigned int cmd, unsigned long ar | |||
858 | int i, ret = 0; | 857 | int i, ret = 0; |
859 | struct fschmd_data *data = filp->private_data; | 858 | struct fschmd_data *data = filp->private_data; |
860 | 859 | ||
861 | mutex_lock(&watchdog_mutex); | ||
862 | switch (cmd) { | 860 | switch (cmd) { |
863 | case WDIOC_GETSUPPORT: | 861 | case WDIOC_GETSUPPORT: |
864 | ident.firmware_version = data->revision; | 862 | ident.firmware_version = data->revision; |
@@ -915,7 +913,6 @@ static long watchdog_ioctl(struct file *filp, unsigned int cmd, unsigned long ar | |||
915 | default: | 913 | default: |
916 | ret = -ENOTTY; | 914 | ret = -ENOTTY; |
917 | } | 915 | } |
918 | mutex_unlock(&watchdog_mutex); | ||
919 | return ret; | 916 | return ret; |
920 | } | 917 | } |
921 | 918 | ||