diff options
Diffstat (limited to 'drivers/hwmon')
| -rw-r--r-- | drivers/hwmon/fschmd.c | 9 | ||||
| -rw-r--r-- | drivers/hwmon/ultra45_env.c | 7 | ||||
| -rw-r--r-- | drivers/hwmon/w83793.c | 10 |
3 files changed, 16 insertions, 10 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 | ||
diff --git a/drivers/hwmon/ultra45_env.c b/drivers/hwmon/ultra45_env.c index 68e90abeba96..5da5942cf970 100644 --- a/drivers/hwmon/ultra45_env.c +++ b/drivers/hwmon/ultra45_env.c | |||
| @@ -300,8 +300,11 @@ static const struct of_device_id env_match[] = { | |||
| 300 | MODULE_DEVICE_TABLE(of, env_match); | 300 | MODULE_DEVICE_TABLE(of, env_match); |
| 301 | 301 | ||
| 302 | static struct of_platform_driver env_driver = { | 302 | static struct of_platform_driver env_driver = { |
| 303 | .name = "ultra45_env", | 303 | .driver = { |
| 304 | .match_table = env_match, | 304 | .name = "ultra45_env", |
| 305 | .owner = THIS_MODULE, | ||
| 306 | .of_match_table = env_match, | ||
| 307 | }, | ||
| 305 | .probe = env_probe, | 308 | .probe = env_probe, |
| 306 | .remove = __devexit_p(env_remove), | 309 | .remove = __devexit_p(env_remove), |
| 307 | }; | 310 | }; |
diff --git a/drivers/hwmon/w83793.c b/drivers/hwmon/w83793.c index 612807d97155..697202e27891 100644 --- a/drivers/hwmon/w83793.c +++ b/drivers/hwmon/w83793.c | |||
| @@ -35,6 +35,7 @@ | |||
| 35 | #include <linux/slab.h> | 35 | #include <linux/slab.h> |
| 36 | #include <linux/i2c.h> | 36 | #include <linux/i2c.h> |
| 37 | #include <linux/hwmon.h> | 37 | #include <linux/hwmon.h> |
| 38 | #include <linux/smp_lock.h> | ||
| 38 | #include <linux/hwmon-vid.h> | 39 | #include <linux/hwmon-vid.h> |
| 39 | #include <linux/hwmon-sysfs.h> | 40 | #include <linux/hwmon-sysfs.h> |
| 40 | #include <linux/err.h> | 41 | #include <linux/err.h> |
| @@ -1319,8 +1320,8 @@ static ssize_t watchdog_write(struct file *filp, const char __user *buf, | |||
| 1319 | return count; | 1320 | return count; |
| 1320 | } | 1321 | } |
| 1321 | 1322 | ||
| 1322 | static int watchdog_ioctl(struct inode *inode, struct file *filp, | 1323 | static long watchdog_ioctl(struct file *filp, unsigned int cmd, |
| 1323 | unsigned int cmd, unsigned long arg) | 1324 | unsigned long arg) |
| 1324 | { | 1325 | { |
| 1325 | static struct watchdog_info ident = { | 1326 | static struct watchdog_info ident = { |
| 1326 | .options = WDIOF_KEEPALIVEPING | | 1327 | .options = WDIOF_KEEPALIVEPING | |
| @@ -1332,6 +1333,7 @@ static int watchdog_ioctl(struct inode *inode, struct file *filp, | |||
| 1332 | int val, ret = 0; | 1333 | int val, ret = 0; |
| 1333 | struct w83793_data *data = filp->private_data; | 1334 | struct w83793_data *data = filp->private_data; |
| 1334 | 1335 | ||
| 1336 | lock_kernel(); | ||
| 1335 | switch (cmd) { | 1337 | switch (cmd) { |
| 1336 | case WDIOC_GETSUPPORT: | 1338 | case WDIOC_GETSUPPORT: |
| 1337 | if (!nowayout) | 1339 | if (!nowayout) |
| @@ -1385,7 +1387,7 @@ static int watchdog_ioctl(struct inode *inode, struct file *filp, | |||
| 1385 | default: | 1387 | default: |
| 1386 | ret = -ENOTTY; | 1388 | ret = -ENOTTY; |
| 1387 | } | 1389 | } |
| 1388 | 1390 | unlock_kernel(); | |
| 1389 | return ret; | 1391 | return ret; |
| 1390 | } | 1392 | } |
| 1391 | 1393 | ||
| @@ -1395,7 +1397,7 @@ static const struct file_operations watchdog_fops = { | |||
| 1395 | .open = watchdog_open, | 1397 | .open = watchdog_open, |
| 1396 | .release = watchdog_close, | 1398 | .release = watchdog_close, |
| 1397 | .write = watchdog_write, | 1399 | .write = watchdog_write, |
| 1398 | .ioctl = watchdog_ioctl, | 1400 | .unlocked_ioctl = watchdog_ioctl, |
| 1399 | }; | 1401 | }; |
| 1400 | 1402 | ||
| 1401 | /* | 1403 | /* |
