From: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
To: Guenter Roeck <linux@roeck-us.net>,
Hardware Monitoring <linux-hwmon@vger.kernel.org>
Cc: Jean Delvare <jdelvare@suse.com>
Subject: Re: [PATCH] hwmon: (adm9240) Fix writes into inX_max attributes
Date: Wed, 12 May 2021 23:57:21 +0000 [thread overview]
Message-ID: <2e79a8b5-a299-803d-6caf-d4d5c223548e@alliedtelesis.co.nz> (raw)
In-Reply-To: <20210512233346.2876734-1-linux@roeck-us.net>
On 13/05/21 11:33 am, Guenter Roeck wrote:
> When converting the driver to use the devm_hwmon_device_register_with_info
> API, the wrong register was selected when writing into inX_max attributes.
> Fix it.
>
> Fixes: 124b7e34a5a6 ("hwmon: (adm9240) Convert to devm_hwmon_device_register_with_info API")
> Reported-by: Chris Packham <Chris.Packham@alliedtelesis.co.nz>
> Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Works for me.
Tested-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> drivers/hwmon/adm9240.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/hwmon/adm9240.c b/drivers/hwmon/adm9240.c
> index 5677263bcf0d..483cd757abd3 100644
> --- a/drivers/hwmon/adm9240.c
> +++ b/drivers/hwmon/adm9240.c
> @@ -485,7 +485,7 @@ static int adm9240_in_write(struct device *dev, u32 attr, int channel, long val)
> reg = ADM9240_REG_IN_MIN(channel);
> break;
> case hwmon_in_max:
> - reg = ADM9240_REG_IN(channel);
> + reg = ADM9240_REG_IN_MAX(channel);
> break;
> default:
> return -EOPNOTSUPP;
prev parent reply other threads:[~2021-05-13 0:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-12 23:33 [PATCH] hwmon: (adm9240) Fix writes into inX_max attributes Guenter Roeck
2021-05-12 23:57 ` Chris Packham [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=2e79a8b5-a299-803d-6caf-d4d5c223548e@alliedtelesis.co.nz \
--to=chris.packham@alliedtelesis.co.nz \
--cc=jdelvare@suse.com \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux@roeck-us.net \
/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).