From: Anton Vorontsov <cbouatmailru@gmail.com>
To: Axel Lin <axel.lin@ingics.com>
Cc: Jonathan Cameron <jic23@kernel.org>,
anish kumar <anish198519851985@gmail.com>,
linux-kernel@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH RESEND] power: generic-adc-battery: Fix checking return value of request_any_context_irq
Date: Fri, 16 Nov 2012 01:47:33 -0800 [thread overview]
Message-ID: <20121116094733.GA21792@lizard> (raw)
In-Reply-To: <1353056962.4277.2.camel@phoenix>
On Fri, Nov 16, 2012 at 05:09:22PM +0800, Axel Lin wrote:
> On failure, request_any_context_irq() returns a negative value.
> On success, it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED.
>
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
> ---
> This was sent on https://lkml.org/lkml/2012/10/11/77
> Nobody picks up this patch, so resend it.
> I think this patch is for 3.7.
Nah, the driver is new, plus I doubt that anyone actually registers it in
v3.7, and it's definitely not a regression.
The fix itself is a valid one though, I applied it to battery tree.
Thank you!
> Regards,
> Axel
> drivers/power/generic-adc-battery.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/power/generic-adc-battery.c b/drivers/power/generic-adc-battery.c
> index 9bdf444..4a00ef7 100644
> --- a/drivers/power/generic-adc-battery.c
> +++ b/drivers/power/generic-adc-battery.c
> @@ -327,7 +327,7 @@ static int __devinit gab_probe(struct platform_device *pdev)
> ret = request_any_context_irq(irq, gab_charged,
> IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING,
> "battery charged", adc_bat);
> - if (ret)
> + if (ret < 0)
> goto err_gpio;
> }
>
> --
> 1.7.9.5
prev parent reply other threads:[~2012-11-16 9:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-16 9:09 [PATCH RESEND] power: generic-adc-battery: Fix checking return value of request_any_context_irq Axel Lin
2012-11-16 9:47 ` 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=20121116094733.GA21792@lizard \
--to=cbouatmailru@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=anish198519851985@gmail.com \
--cc=axel.lin@ingics.com \
--cc=jic23@kernel.org \
--cc=linux-kernel@vger.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).