linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] hwmon: (dell-smm-hwmon) Fix index values
@ 2021-05-13 15:45 W_Armin
  2021-05-13 16:48 ` Pali Rohár
  2021-05-13 16:54 ` Guenter Roeck
  0 siblings, 2 replies; 7+ messages in thread
From: W_Armin @ 2021-05-13 15:45 UTC (permalink / raw)
  To: pali; +Cc: linux-hwmon, linux, jdelvare

From: Armin Wolf <W_Armin@gmx.de>

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>
---
Tested on a Dell Latitude C600.
---
 drivers/hwmon/dell-smm-hwmon.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 2970892bed82..f2221ca0aa7b 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -838,10 +838,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))
--
2.20.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-13 18:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-13 15:45 [PATCH] hwmon: (dell-smm-hwmon) Fix index values W_Armin
2021-05-13 16:48 ` Pali Rohár
2021-05-13 16:53   ` Guenter Roeck
2021-05-13 18:41     ` Armin Wolf
2021-05-13 18:48       ` Guenter Roeck
2021-05-13 18:54       ` Pali Rohár
2021-05-13 16:54 ` Guenter Roeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).