diff options
| author | Guenter Roeck <linux@roeck-us.net> | 2015-03-27 09:03:41 -0400 |
|---|---|---|
| committer | Guenter Roeck <linux@roeck-us.net> | 2015-03-30 11:12:16 -0400 |
| commit | 1696d1deb05710f246f62e810034fb5d8d7713bd (patch) | |
| tree | d32b34bc5cc06f09b64e5cd96c27fb6513256f36 /drivers/hwmon | |
| parent | fcaf57b67dd03314ade476b847f246ae377160a8 (diff) | |
hwmon: (it87) Fix pwm sysfs attribute removal
Detection if a pwm channel is supported was wrong on removal,
causing the code to try removing non-existing sysfs attributes.
That didn't matter much because sysfs attribute removal of non-existing
files fails silently, and because the wrong evaluation always returned
false, but should nevertheless be fixed.
Reviewed-by: Jean Delvare <jdelvare@suse.de>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Diffstat (limited to 'drivers/hwmon')
| -rw-r--r-- | drivers/hwmon/it87.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hwmon/it87.c b/drivers/hwmon/it87.c index ab12dc2eb896..81a43db371f7 100644 --- a/drivers/hwmon/it87.c +++ b/drivers/hwmon/it87.c | |||
| @@ -2079,7 +2079,7 @@ static void it87_remove_files(struct device *dev) | |||
| 2079 | it87_attributes_fan_div[i]); | 2079 | it87_attributes_fan_div[i]); |
| 2080 | } | 2080 | } |
| 2081 | for (i = 0; i < 3; i++) { | 2081 | for (i = 0; i < 3; i++) { |
| 2082 | if (sio_data->skip_pwm & (1 << 0)) | 2082 | if (sio_data->skip_pwm & (1 << i)) |
| 2083 | continue; | 2083 | continue; |
| 2084 | sysfs_remove_group(&dev->kobj, &it87_group_pwm[i]); | 2084 | sysfs_remove_group(&dev->kobj, &it87_group_pwm[i]); |
| 2085 | if (has_old_autopwm(data)) | 2085 | if (has_old_autopwm(data)) |
