From: W_Armin@gmx.de
To: pali@kernel.org
Cc: linux@roeck-us.net, jdelvare@suse.com, linux-hwmon@vger.kernel.org
Subject: [PATCH v7 6/6] hwmon: (dell-smm-hwmon) Fix fan mutliplier detection for 3rd fan
Date: Thu, 29 Jul 2021 00:15:57 +0200 [thread overview]
Message-ID: <20210728221557.8891-7-W_Armin@gmx.de> (raw)
In-Reply-To: <20210728221557.8891-1-W_Armin@gmx.de>
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>
Fixes: 747bc8b063ae (hwmon: (dell-smm) Detect fan with index=2)
---
drivers/hwmon/dell-smm-hwmon.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hwmon/dell-smm-hwmon.c b/drivers/hwmon/dell-smm-hwmon.c
index aaf864dbe53a..206418405440 100644
--- a/drivers/hwmon/dell-smm-hwmon.c
+++ b/drivers/hwmon/dell-smm-hwmon.c
@@ -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;
--
2.20.1
next prev parent reply other threads:[~2021-07-28 22:16 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-28 22:15 [PATCH v7 0/6] hwmon: (dell-smm-hwmon) Convert to new hwmon registration api W_Armin
2021-07-28 22:15 ` [PATCH v7 1/6] hwmon: (dell-smm-hwmon) Use platform device W_Armin
2021-07-28 22:15 ` [PATCH v7 2/6] hwmon: (dell-smm-hwmon) Mark functions as __init W_Armin
2021-07-28 22:15 ` [PATCH v7 3/6] hwmon: (dell-smm-hwmon) Use devm_add_action_or_reset() W_Armin
2021-07-28 22:15 ` [PATCH v7 4/6] hwmon: (dell-smm-hwmon) Move variables into a driver private data structure W_Armin
2021-07-28 22:15 ` [PATCH v7 5/6] hwmon: (dell-smm-hwmon) Convert to devm_hwmon_device_register_with_info() W_Armin
2021-07-28 22:15 ` W_Armin [this message]
2021-07-28 22:43 ` [PATCH v7 0/6] hwmon: (dell-smm-hwmon) Convert to new hwmon registration api Guenter Roeck
2021-07-28 22:49 ` Armin Wolf
2021-07-29 2:26 ` Guenter Roeck
2021-07-29 7:24 ` Pali Rohár
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210728221557.8891-7-W_Armin@gmx.de \
--to=w_armin@gmx.de \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=pali@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox