diff mbox series

[v3,6/6] hwmon: (dell-smm-hwmon) Fix fan mutliplier detection for 3rd fan

Message ID 20210529063857.10177-7-W_Armin@gmx.de (mailing list archive)
State Superseded
Headers show
Series Convert to new hwmon registration api | expand

Commit Message

Armin Wolf May 29, 2021, 6:38 a.m. UTC
From: Armin Wolf <W_Armin@gmx.de>

There are up to three fans, but the detection omits the 3rd one.
Fix that by using DELL_SMM_NO_FANS.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
---
 drivers/hwmon/dell-smm-hwmon.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--
2.20.1
diff mbox series

Patch

diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index 0ef3dad74a2c..b7378f84e1bd 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -1248,7 +1248,7 @@  static int __init dell_smm_probe(struct platform_device *pdev)
 		 * Autodetect fan multiplier based on nominal rpm
 		 * If fan reports rpm value too high then set multiplier to 1
 		 */
-		for (fan = 0; fan < 2; ++fan) {
+		for (fan = 0; fan < DELL_SMM_NO_FANS; ++fan) {
 			ret = i8k_get_fan_nominal_speed(data, fan, data->i8k_fan_max);
 			if (ret < 0)
 				continue;