aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hwmon
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2007-11-30 17:52:44 -0500
committerMark M. Hoffman <mhoffman@lightlink.com>2008-02-07 20:39:43 -0500
commit293c09971631d22f8e91402f58955ccaada9dbde (patch)
treec5cdf121b455df519cc18f4daeefdaf112df3c91 /drivers/hwmon
parent05663368d2138c14fa1b9aa8eeca4ca9a33d7c77 (diff)
hwmon: (w83781d) Misc cleanups
* Drop unused defines * Drop unused driver ID * Remove trailing whitespace Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Diffstat (limited to 'drivers/hwmon')
-rw-r--r--drivers/hwmon/w83781d.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/hwmon/w83781d.c b/drivers/hwmon/w83781d.c
index 8d4d1acbf650..7421f6ea53e1 100644
--- a/drivers/hwmon/w83781d.c
+++ b/drivers/hwmon/w83781d.c
@@ -151,10 +151,6 @@ static const u8 BIT_SCFG2[] = { 0x10, 0x20, 0x40 };
151 151
152#define W83781D_DEFAULT_BETA 3435 152#define W83781D_DEFAULT_BETA 3435
153 153
154/* RT Table registers */
155#define W83781D_REG_RT_IDX 0x50
156#define W83781D_REG_RT_VAL 0x51
157
158/* Conversions */ 154/* Conversions */
159#define IN_TO_REG(val) SENSORS_LIMIT(((val) + 8) / 16, 0, 255) 155#define IN_TO_REG(val) SENSORS_LIMIT(((val) + 8) / 16, 0, 255)
160#define IN_FROM_REG(val) ((val) * 16) 156#define IN_FROM_REG(val) ((val) * 16)
@@ -269,7 +265,6 @@ static struct i2c_driver w83781d_driver = {
269 .driver = { 265 .driver = {
270 .name = "w83781d", 266 .name = "w83781d",
271 }, 267 },
272 .id = I2C_DRIVERID_W83781D,
273 .attach_adapter = w83781d_attach_adapter, 268 .attach_adapter = w83781d_attach_adapter,
274 .detach_client = w83781d_detach_client, 269 .detach_client = w83781d_detach_client,
275}; 270};
@@ -694,7 +689,7 @@ store_fan_div(struct device *dev, struct device_attribute *da,
694 unsigned long val = simple_strtoul(buf, NULL, 10); 689 unsigned long val = simple_strtoul(buf, NULL, 10);
695 690
696 mutex_lock(&data->update_lock); 691 mutex_lock(&data->update_lock);
697 692
698 /* Save fan_min */ 693 /* Save fan_min */
699 min = FAN_FROM_REG(data->fan_min[nr], 694 min = FAN_FROM_REG(data->fan_min[nr],
700 DIV_FROM_REG(data->fan_div[nr])); 695 DIV_FROM_REG(data->fan_div[nr]));
@@ -1000,7 +995,7 @@ ERROR_SC_0:
1000#define IN_UNIT_ATTRS(X) \ 995#define IN_UNIT_ATTRS(X) \
1001 &sensor_dev_attr_in##X##_input.dev_attr.attr, \ 996 &sensor_dev_attr_in##X##_input.dev_attr.attr, \
1002 &sensor_dev_attr_in##X##_min.dev_attr.attr, \ 997 &sensor_dev_attr_in##X##_min.dev_attr.attr, \
1003 &sensor_dev_attr_in##X##_max.dev_attr.attr, \ 998 &sensor_dev_attr_in##X##_max.dev_attr.attr, \
1004 &sensor_dev_attr_in##X##_alarm.dev_attr.attr, \ 999 &sensor_dev_attr_in##X##_alarm.dev_attr.attr, \
1005 &sensor_dev_attr_in##X##_beep.dev_attr.attr 1000 &sensor_dev_attr_in##X##_beep.dev_attr.attr
1006 1001
@@ -1441,9 +1436,9 @@ w83781d_isa_remove(struct platform_device *pdev)
1441} 1436}
1442 1437
1443/* The SMBus locks itself, usually, but nothing may access the Winbond between 1438/* The SMBus locks itself, usually, but nothing may access the Winbond between
1444 bank switches. ISA access must always be locked explicitly! 1439 bank switches. ISA access must always be locked explicitly!
1445 We ignore the W83781D BUSY flag at this moment - it could lead to deadlocks, 1440 We ignore the W83781D BUSY flag at this moment - it could lead to deadlocks,
1446 would slow down the W83781D access and should not be necessary. 1441 would slow down the W83781D access and should not be necessary.
1447 There are some ugly typecasts here, but the good news is - they should 1442 There are some ugly typecasts here, but the good news is - they should
1448 nowhere else be necessary! */ 1443 nowhere else be necessary! */
1449static int 1444static int