projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d3e19a
)
hwmon: (adt7473) clarify an awkward bit of code
author
Mark M. Hoffman
<mhoffman@lightlink.com>
Mon, 26 May 2008 19:09:36 +0000
(15:09 -0400)
committer
Mark M. Hoffman
<mhoffman@lightlink.com>
Fri, 1 Aug 2008 03:44:02 +0000
(23:44 -0400)
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Acked-by: Jean Delvare <khali@linux-fr.org>
drivers/hwmon/adt7473.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/adt7473.c
b/drivers/hwmon/adt7473.c
index
7ecebfd
..
0cd6c72
100644
(file)
--- 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,
struct i2c_client *client = to_i2c_client(dev);
struct adt7473_data *data = i2c_get_clientdata(client);
int temp = simple_strtol(buf, NULL, 10);
- temp = temp && 0xFF;
mutex_lock(&data->lock);
- data->max_duty_at_overheat = temp;
+ data->max_duty_at_overheat =
!!
temp;
reg = i2c_smbus_read_byte_data(client, ADT7473_REG_CFG4);
if (temp)
reg |= ADT7473_CFG4_MAX_DUTY_AT_OVT;