mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
hwmon: (ftsteutates) Fix clearing alarm sysfs entries
sysfs store functions should return the number of bytes written.
Returning zero results in an endless loop.
Fixes: 08426eda58 ("hwmon: Add driver for FTS BMC chip "Teutates"")
Signed-off-by: Thilo Cestonaro <[email protected]>
[groeck: Clean up documentation change and description]
Signed-off-by: Guenter Roeck <[email protected]>
This commit is contained in:
parent
aae4e7a8bc
commit
7576750f03
2 changed files with 6 additions and 0 deletions
|
|
@ -435,6 +435,7 @@ clear_temp_alarm(struct device *dev, struct device_attribute *devattr,
|
|||
goto error;
|
||||
|
||||
data->valid = false;
|
||||
ret = count;
|
||||
error:
|
||||
mutex_unlock(&data->update_lock);
|
||||
return ret;
|
||||
|
|
@ -508,6 +509,7 @@ clear_fan_alarm(struct device *dev, struct device_attribute *devattr,
|
|||
goto error;
|
||||
|
||||
data->valid = false;
|
||||
ret = count;
|
||||
error:
|
||||
mutex_unlock(&data->update_lock);
|
||||
return ret;
|
||||
|
|
|
|||
Loading…
Reference in a new issue