Skip to content

Commit 477d4e4

Browse files
committed
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
2 parents fe9d115 + 52d159e commit 477d4e4

File tree

5 files changed

+192
-42
lines changed

5 files changed

+192
-42
lines changed

drivers/hwmon/amc6821.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Copyright (C) 2009 T. Mertelj <[email protected]>
55
66
Based on max6650.c:
7-
Copyright (C) 2007 Hans J. Koch <hjk@linutronix.de>
7+
Copyright (C) 2007 Hans J. Koch <hjk@hansjkoch.de>
88
99
This program is free software; you can redistribute it and/or modify
1010
it under the terms of the GNU General Public License as published by

drivers/hwmon/lm93.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
Adapted to 2.6.20 by Carsten Emde <[email protected]>
2121
Copyright (c) 2006 Carsten Emde, Open Source Automation Development Lab
2222
23-
Modified for mainline integration by Hans J. Koch <hjk@linutronix.de>
23+
Modified for mainline integration by Hans J. Koch <hjk@hansjkoch.de>
2424
Copyright (c) 2007 Hans J. Koch, Linutronix GmbH
2525
2626
This program is free software; you can redistribute it and/or modify
@@ -2629,7 +2629,7 @@ static void __exit lm93_exit(void)
26292629
}
26302630

26312631
MODULE_AUTHOR("Mark M. Hoffman <[email protected]>, "
2632-
"Hans J. Koch <hjk@linutronix.de");
2632+
"Hans J. Koch <hjk@hansjkoch.de>");
26332633
MODULE_DESCRIPTION("LM93 driver");
26342634
MODULE_LICENSE("GPL");
26352635

drivers/hwmon/lm95241.c

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,12 @@ static ssize_t set_interval(struct device *dev, struct device_attribute *attr,
128128
{
129129
struct i2c_client *client = to_i2c_client(dev);
130130
struct lm95241_data *data = i2c_get_clientdata(client);
131+
unsigned long val;
131132

132-
strict_strtol(buf, 10, &data->interval);
133-
data->interval = data->interval * HZ / 1000;
133+
if (strict_strtoul(buf, 10, &val) < 0)
134+
return -EINVAL;
135+
136+
data->interval = val * HZ / 1000;
134137

135138
return count;
136139
}
@@ -188,7 +191,9 @@ static ssize_t set_type##flag(struct device *dev, \
188191
struct lm95241_data *data = i2c_get_clientdata(client); \
189192
\
190193
long val; \
191-
strict_strtol(buf, 10, &val); \
194+
\
195+
if (strict_strtol(buf, 10, &val) < 0) \
196+
return -EINVAL; \
192197
\
193198
if ((val == 1) || (val == 2)) { \
194199
\
@@ -227,7 +232,9 @@ static ssize_t set_min##flag(struct device *dev, \
227232
struct lm95241_data *data = i2c_get_clientdata(client); \
228233
\
229234
long val; \
230-
strict_strtol(buf, 10, &val); \
235+
\
236+
if (strict_strtol(buf, 10, &val) < 0) \
237+
return -EINVAL;\
231238
\
232239
mutex_lock(&data->update_lock); \
233240
\
@@ -256,7 +263,9 @@ static ssize_t set_max##flag(struct device *dev, \
256263
struct lm95241_data *data = i2c_get_clientdata(client); \
257264
\
258265
long val; \
259-
strict_strtol(buf, 10, &val); \
266+
\
267+
if (strict_strtol(buf, 10, &val) < 0) \
268+
return -EINVAL; \
260269
\
261270
mutex_lock(&data->update_lock); \
262271
\

drivers/hwmon/max6650.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
* max6650.c - Part of lm_sensors, Linux kernel modules for hardware
33
* monitoring.
44
*
5-
* (C) 2007 by Hans J. Koch <hjk@linutronix.de>
5+
* (C) 2007 by Hans J. Koch <hjk@hansjkoch.de>
66
*
77
* based on code written by John Morris <[email protected]>
88
* Copyright (c) 2003 Spirent Communications

0 commit comments

Comments
 (0)