projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b1b561a
)
hwmon: (f75375s) Disable setting DC fan control mode for F75373
author
Guenter Roeck
<
[email protected]
>
Thu, 8 Dec 2011 18:55:16 +0000
(10:55 -0800)
committer
Guenter Roeck
<
[email protected]
>
Thu, 5 Jan 2012 16:19:31 +0000
(08:19 -0800)
F75373 does not support DC (linear voltage) fan control mode, so don't let
the user set it.
Cc: Riku Voipio <
[email protected]
>
Reviewed-by: Bjoern Gerhart <
[email protected]
>
Signed-off-by: Guenter Roeck <
[email protected]
>
drivers/hwmon/f75375s.c
patch
|
blob
|
history
diff --git
a/drivers/hwmon/f75375s.c
b/drivers/hwmon/f75375s.c
index 9c3f078e263be10a604bc9799dca27e5940de07e..35b570e56ff0d29bf2c6ff7f3e35b148dc01d666 100644
(file)
--- a/
drivers/hwmon/f75375s.c
+++ b/
drivers/hwmon/f75375s.c
@@
-372,6
+372,10
@@
static ssize_t set_pwm_mode(struct device *dev, struct device_attribute *attr,
if (!(val == 0 || val == 1))
return -EINVAL;
+ /* F75373 does not support DC (linear voltage) fan control mode */
+ if (data->kind == f75373 && val == 0)
+ return -EINVAL;
+
mutex_lock(&data->update_lock);
conf = f75375_read8(client, F75375_REG_CONFIG1);
conf &= ~(1 << FAN_CTRL_LINEAR(nr));