From: Anton Vorontsov <anton@enomsg.org>
To: Belisko Marek <marek.belisko@gmail.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
LKML <linux-kernel@vger.kernel.org>,
pali.rohar@gmail.com
Subject: Re: [PATCH] power: rx51_battery: Replace hardcoded channels values.
Date: Fri, 30 Aug 2013 17:56:20 -0700 [thread overview]
Message-ID: <20130831005620.GA28473@teo> (raw)
In-Reply-To: <CAAfyv34Y69L3HLG9GB43JE7_EWWg143BD3jcq8xfmFUraD1JGA@mail.gmail.com>
> This issue was introduced in commit:
> power: rx51_battery: Replace hardcoded channels values.
>
> Original code use channel as argument which was shifted by one in function.
> After mentioned commit argument is already shifted so we need to get index
> back.
>
> Signed-off-by: Marek Belisko <marek.belisko@open-nandra.com>
Applied, thanks!
> ---
> drivers/power/rx51_battery.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/rx51_battery.c b/drivers/power/rx51_battery.c
> index 03f5761..1bc5857 100644
> --- a/drivers/power/rx51_battery.c
> +++ b/drivers/power/rx51_battery.c
> @@ -51,7 +51,7 @@ static int rx51_battery_read_adc(int channel)
> if (twl4030_madc_conversion(&req) <= 0)
> return -ENODATA;
>
> - return req.rbuf[channel];
> + return req.rbuf[ffs(channel) - 1];
> }
>
> /*
prev parent reply other threads:[~2013-08-31 0:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-21 22:45 [PATCH] power: rx51_battery: Replace hardcoded channels values Marek Belisko
2013-08-28 1:27 ` Anton Vorontsov
2013-08-28 6:07 ` Belisko Marek
2013-08-31 0:56 ` Anton Vorontsov [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=20130831005620.GA28473@teo \
--to=anton@enomsg.org \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marek.belisko@gmail.com \
--cc=pali.rohar@gmail.com \
/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