diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-04-26 18:24:05 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-16 23:27:41 -0400 |
commit | 55929332c92e5d34d65a8f784604c92677ea3e15 (patch) | |
tree | 555e922d470336d07ace32bb564ac5358379a3c4 /drivers/hwmon/fschmd.c | |
parent | 703c631ebbcadcfd861d01e697fdda7c388fec9a (diff) |
drivers: Push down BKL into various drivers
These are the last remaining device drivers using
the ->ioctl file operation in the drivers directory
(except from v4l drivers).
[fweisbec: drop i8k pushdown as it has been done from
procfs pushdown branch already]
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'drivers/hwmon/fschmd.c')
-rw-r--r-- | drivers/hwmon/fschmd.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/hwmon/fschmd.c b/drivers/hwmon/fschmd.c index 0627f7a5b9b8..b7ca2a9676cf 100644 --- a/drivers/hwmon/fschmd.c +++ b/drivers/hwmon/fschmd.c | |||
@@ -38,6 +38,7 @@ | |||
38 | #include <linux/i2c.h> | 38 | #include <linux/i2c.h> |
39 | #include <linux/hwmon.h> | 39 | #include <linux/hwmon.h> |
40 | #include <linux/hwmon-sysfs.h> | 40 | #include <linux/hwmon-sysfs.h> |
41 | #include <linux/smp_lock.h> | ||
41 | #include <linux/err.h> | 42 | #include <linux/err.h> |
42 | #include <linux/mutex.h> | 43 | #include <linux/mutex.h> |
43 | #include <linux/sysfs.h> | 44 | #include <linux/sysfs.h> |
@@ -847,8 +848,7 @@ static ssize_t watchdog_write(struct file *filp, const char __user *buf, | |||
847 | return count; | 848 | return count; |
848 | } | 849 | } |
849 | 850 | ||
850 | static int watchdog_ioctl(struct inode *inode, struct file *filp, | 851 | static long watchdog_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
851 | unsigned int cmd, unsigned long arg) | ||
852 | { | 852 | { |
853 | static struct watchdog_info ident = { | 853 | static struct watchdog_info ident = { |
854 | .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | | 854 | .options = WDIOF_KEEPALIVEPING | WDIOF_SETTIMEOUT | |
@@ -858,6 +858,7 @@ static int watchdog_ioctl(struct inode *inode, struct file *filp, | |||
858 | int i, ret = 0; | 858 | int i, ret = 0; |
859 | struct fschmd_data *data = filp->private_data; | 859 | struct fschmd_data *data = filp->private_data; |
860 | 860 | ||
861 | lock_kernel(); | ||
861 | switch (cmd) { | 862 | switch (cmd) { |
862 | case WDIOC_GETSUPPORT: | 863 | case WDIOC_GETSUPPORT: |
863 | ident.firmware_version = data->revision; | 864 | ident.firmware_version = data->revision; |
@@ -914,7 +915,7 @@ static int watchdog_ioctl(struct inode *inode, struct file *filp, | |||
914 | default: | 915 | default: |
915 | ret = -ENOTTY; | 916 | ret = -ENOTTY; |
916 | } | 917 | } |
917 | 918 | unlock_kernel(); | |
918 | return ret; | 919 | return ret; |
919 | } | 920 | } |
920 | 921 | ||
@@ -924,7 +925,7 @@ static const struct file_operations watchdog_fops = { | |||
924 | .open = watchdog_open, | 925 | .open = watchdog_open, |
925 | .release = watchdog_release, | 926 | .release = watchdog_release, |
926 | .write = watchdog_write, | 927 | .write = watchdog_write, |
927 | .ioctl = watchdog_ioctl, | 928 | .unlocked_ioctl = watchdog_ioctl, |
928 | }; | 929 | }; |
929 | 930 | ||
930 | 931 | ||