linux-hwmon.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: W_Armin@gmx.de
Cc: pali@kernel.org, linux-hwmon@vger.kernel.org, jdelvare@suse.com
Subject: Re: [PATCH] hwmon: (dell-smm-hwmon) Fix index values
Date: Thu, 13 May 2021 09:54:42 -0700	[thread overview]
Message-ID: <20210513165442.GA1249121@roeck-us.net> (raw)
In-Reply-To: <20210513154546.12430-1-W_Armin@gmx.de>

On Thu, May 13, 2021 at 05:45:46PM +0200, W_Armin@gmx.de wrote:
> 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>
> Reviewed-by: Pali Rohár <pali@kernel.org>

Applied, with added Fixes: tag.

Guenter

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

      parent reply	other threads:[~2021-05-13 16:54 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

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=20210513165442.GA1249121@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=W_Armin@gmx.de \
    --cc=jdelvare@suse.com \
    --cc=linux-hwmon@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).