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>
This commit is contained in:
Guenter Roeck 2015-03-27 06:03:41 -07:00
Родитель fcaf57b67d
Коммит 1696d1deb0
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -2079,7 +2079,7 @@ static void it87_remove_files(struct device *dev)
it87_attributes_fan_div[i]);
}
for (i = 0; i < 3; i++) {
if (sio_data->skip_pwm & (1 << 0))
if (sio_data->skip_pwm & (1 << i))
continue;
sysfs_remove_group(&dev->kobj, &it87_group_pwm[i]);
if (has_old_autopwm(data))