Commit 2757269a authored by Armin Wolf's avatar Armin Wolf Committed by Guenter Roeck

hwmon: (dell-smm-hwmon) Fix fan mutliplier detection for 3rd fan

There are up to three fans, but the detection omits the 3rd one.
Fix that by using DELL_SMM_NO_FANS.
Signed-off-by: default avatarArmin Wolf <W_Armin@gmx.de>
Fixes: 747bc8b0 (hwmon: (dell-smm) Detect fan with index=2)
Link: https://lore.kernel.org/r/20210728221557.8891-7-W_Armin@gmx.deSigned-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
parent deeba244
......@@ -1263,7 +1263,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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment