diff options
author | Armin Wolf <W_Armin@gmx.de> | 2021-05-13 17:45:46 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-10 13:37:02 +0200 |
commit | 90870b45fc6204d4a619c3bc0ed45eadab3df4fc (patch) | |
tree | 1d8a9983a3917caac730cbf1d50d2a1408eaf325 /drivers/hwmon/dell-smm-hwmon.c | |
parent | nl80211: validate key indexes for cfg80211_registered_device (diff) | |
download | wireguard-linux-90870b45fc6204d4a619c3bc0ed45eadab3df4fc.tar.xz wireguard-linux-90870b45fc6204d4a619c3bc0ed45eadab3df4fc.zip |
hwmon: (dell-smm-hwmon) Fix index values
[ Upstream commit 35d470b5fbc9f82feb77b56bb0d5d0b5cd73e9da ]
When support for up to 10 temp sensors and for disabling automatic BIOS
fan control was added, noone updated the index values used for
disallowing fan support and fan type calls.
Fix those values.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Reviewed-by: Pali Rohár <pali@kernel.org>
Link: https://lore.kernel.org/r/20210513154546.12430-1-W_Armin@gmx.de
Fixes: 1bb46a20e73b ("hwmon: (dell-smm) Support up to 10 temp sensors")
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to '')
-rw-r--r-- | drivers/hwmon/dell-smm-hwmon.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c index 4212d022d253..35c00420d855 100644 --- a/drivers/hwmon/dell-smm-hwmon.c +++ b/drivers/hwmon/dell-smm-hwmon.c @@ -792,10 +792,10 @@ static struct attribute *i8k_attrs[] = { static umode_t i8k_is_visible(struct kobject *kobj, struct attribute *attr, int index) { - if (disallow_fan_support && index >= 8) + if (disallow_fan_support && index >= 20) return 0; if (disallow_fan_type_call && - (index == 9 || index == 12 || index == 15)) + (index == 21 || index == 25 || index == 28)) return 0; if (index >= 0 && index <= 1 && !(i8k_hwmon_flags & I8K_HWMON_HAVE_TEMP1)) |