Commit 477d4e4f authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging

* 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging:
  hwmon: (w83795) Check for BEEP pin availability
  hwmon: (w83795) Clear intrusion alarm immediately
  hwmon: (w83795) Read the intrusion state properly
  hwmon: (w83795) Print the actual temperature channels as sources
  hwmon: (w83795) List all usable temperature sources
  hwmon: (w83795) Expose fan control method
  hwmon: (w83795) Fix fan control mode attributes
  hwmon: (lm95241) Check validity of input values
  hwmon: Change mail address of Hans J. Koch
parents fe9d1159 52d159ee
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
Copyright (C) 2009 T. Mertelj <tomaz.mertelj@guest.arnes.si> Copyright (C) 2009 T. Mertelj <tomaz.mertelj@guest.arnes.si>
Based on max6650.c: Based on max6650.c:
Copyright (C) 2007 Hans J. Koch <hjk@linutronix.de> Copyright (C) 2007 Hans J. Koch <hjk@hansjkoch.de>
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
Adapted to 2.6.20 by Carsten Emde <cbe@osadl.org> Adapted to 2.6.20 by Carsten Emde <cbe@osadl.org>
Copyright (c) 2006 Carsten Emde, Open Source Automation Development Lab Copyright (c) 2006 Carsten Emde, Open Source Automation Development Lab
Modified for mainline integration by Hans J. Koch <hjk@linutronix.de> Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de>
Copyright (c) 2007 Hans J. Koch, Linutronix GmbH Copyright (c) 2007 Hans J. Koch, Linutronix GmbH
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
...@@ -2629,7 +2629,7 @@ static void __exit lm93_exit(void) ...@@ -2629,7 +2629,7 @@ static void __exit lm93_exit(void)
} }
MODULE_AUTHOR("Mark M. Hoffman <mhoffman@lightlink.com>, " MODULE_AUTHOR("Mark M. Hoffman <mhoffman@lightlink.com>, "
"Hans J. Koch <hjk@linutronix.de"); "Hans J. Koch <hjk@hansjkoch.de>");
MODULE_DESCRIPTION("LM93 driver"); MODULE_DESCRIPTION("LM93 driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
......
...@@ -128,9 +128,12 @@ static ssize_t set_interval(struct device *dev, struct device_attribute *attr, ...@@ -128,9 +128,12 @@ static ssize_t set_interval(struct device *dev, struct device_attribute *attr,
{ {
struct i2c_client *client = to_i2c_client(dev); struct i2c_client *client = to_i2c_client(dev);
struct lm95241_data *data = i2c_get_clientdata(client); struct lm95241_data *data = i2c_get_clientdata(client);
unsigned long val;
strict_strtol(buf, 10, &data->interval); if (strict_strtoul(buf, 10, &val) < 0)
data->interval = data->interval * HZ / 1000; return -EINVAL;
data->interval = val * HZ / 1000;
return count; return count;
} }
...@@ -188,7 +191,9 @@ static ssize_t set_type##flag(struct device *dev, \ ...@@ -188,7 +191,9 @@ static ssize_t set_type##flag(struct device *dev, \
struct lm95241_data *data = i2c_get_clientdata(client); \ struct lm95241_data *data = i2c_get_clientdata(client); \
\ \
long val; \ long val; \
strict_strtol(buf, 10, &val); \ \
if (strict_strtol(buf, 10, &val) < 0) \
return -EINVAL; \
\ \
if ((val == 1) || (val == 2)) { \ if ((val == 1) || (val == 2)) { \
\ \
...@@ -227,7 +232,9 @@ static ssize_t set_min##flag(struct device *dev, \ ...@@ -227,7 +232,9 @@ static ssize_t set_min##flag(struct device *dev, \
struct lm95241_data *data = i2c_get_clientdata(client); \ struct lm95241_data *data = i2c_get_clientdata(client); \
\ \
long val; \ long val; \
strict_strtol(buf, 10, &val); \ \
if (strict_strtol(buf, 10, &val) < 0) \
return -EINVAL;\
\ \
mutex_lock(&data->update_lock); \ mutex_lock(&data->update_lock); \
\ \
...@@ -256,7 +263,9 @@ static ssize_t set_max##flag(struct device *dev, \ ...@@ -256,7 +263,9 @@ static ssize_t set_max##flag(struct device *dev, \
struct lm95241_data *data = i2c_get_clientdata(client); \ struct lm95241_data *data = i2c_get_clientdata(client); \
\ \
long val; \ long val; \
strict_strtol(buf, 10, &val); \ \
if (strict_strtol(buf, 10, &val) < 0) \
return -EINVAL; \
\ \
mutex_lock(&data->update_lock); \ mutex_lock(&data->update_lock); \
\ \
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* max6650.c - Part of lm_sensors, Linux kernel modules for hardware * max6650.c - Part of lm_sensors, Linux kernel modules for hardware
* monitoring. * monitoring.
* *
* (C) 2007 by Hans J. Koch <hjk@linutronix.de> * (C) 2007 by Hans J. Koch <hjk@hansjkoch.de>
* *
* based on code written by John Morris <john.morris@spirentcom.com> * based on code written by John Morris <john.morris@spirentcom.com>
* Copyright (c) 2003 Spirent Communications * Copyright (c) 2003 Spirent Communications
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment