aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorMark M. Hoffman <mhoffman@lightlink.com>2008-05-26 15:09:36 -0400
committerMark M. Hoffman <mhoffman@lightlink.com>2008-07-31 23:44:02 -0400
commit321c4138573da888ca30a387e9973f690c217e9e (patch)
tree066f5ed405dfb39c483f9b6a4c62b7f26c1ea0c2 /drivers
parent9d3e19afd35907bf58b205096cd33e97df8fb6a5 (diff)
hwmon: (adt7473) clarify an awkward bit of code
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com> Acked-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/hwmon/adt7473.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/hwmon/adt7473.c b/drivers/hwmon/adt7473.c
index 7ecebfd404e9..0cd6c720a854 100644
--- a/drivers/hwmon/adt7473.c
+++ b/drivers/hwmon/adt7473.c
@@ -559,10 +559,9 @@ static ssize_t set_max_duty_at_crit(struct device *dev,
559 struct i2c_client *client = to_i2c_client(dev); 559 struct i2c_client *client = to_i2c_client(dev);
560 struct adt7473_data *data = i2c_get_clientdata(client); 560 struct adt7473_data *data = i2c_get_clientdata(client);
561 int temp = simple_strtol(buf, NULL, 10); 561 int temp = simple_strtol(buf, NULL, 10);
562 temp = temp && 0xFF;
563 562
564 mutex_lock(&data->lock); 563 mutex_lock(&data->lock);
565 data->max_duty_at_overheat = temp; 564 data->max_duty_at_overheat = !!temp;
566 reg = i2c_smbus_read_byte_data(client, ADT7473_REG_CFG4); 565 reg = i2c_smbus_read_byte_data(client, ADT7473_REG_CFG4);
567 if (temp) 566 if (temp)
568 reg |= ADT7473_CFG4_MAX_DUTY_AT_OVT; 567 reg |= ADT7473_CFG4_MAX_DUTY_AT_OVT;