From: Lars-Peter Clausen <lars@metafoo.de>
To: Pritesh Raithatha <praithatha@nvidia.com>
Cc: cbouatmailru@gmail.com, axel.lin@gmail.com,
cabarnes@indesign-llc.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] gpio-charger: use cansleep version of gpio_set_value
Date: Tue, 22 May 2012 12:30:31 +0200 [thread overview]
Message-ID: <4FBB6AC7.8040303@metafoo.de> (raw)
In-Reply-To: <1337676604-22836-1-git-send-email-praithatha@nvidia.com>
On 05/22/2012 10:50 AM, Pritesh Raithatha wrote:
> Context of gpio_charger_get_property is sleepable so we should
> use gpio_set_value_cansleep instead of gpio_set_value.
>
> It will remove WARN_ON incase of using gpio from i2c-to-gpio
> expander like pca953x.
>
> Signed-off-by: Pritesh Raithatha <praithatha@nvidia.com>
Looks good,
Acked-by: Lars-Peter Clausen <lars@metafoo.de>
> ---
> drivers/power/gpio-charger.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/power/gpio-charger.c b/drivers/power/gpio-charger.c
> index 8672c91..cb2aa31 100644
> --- a/drivers/power/gpio-charger.c
> +++ b/drivers/power/gpio-charger.c
> @@ -54,7 +54,7 @@ static int gpio_charger_get_property(struct power_supply *psy,
>
> switch (psp) {
> case POWER_SUPPLY_PROP_ONLINE:
> - val->intval = gpio_get_value(pdata->gpio);
> + val->intval = gpio_get_value_cansleep(pdata->gpio);
> val->intval ^= pdata->gpio_active_low;
> break;
> default:
next prev parent reply other threads:[~2012-05-22 10:27 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-22 8:50 [PATCH] gpio-charger: use cansleep version of gpio_set_value Pritesh Raithatha
2012-05-22 10:30 ` Lars-Peter Clausen [this message]
2012-06-20 3:49 ` Anton Vorontsov
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=4FBB6AC7.8040303@metafoo.de \
--to=lars@metafoo.de \
--cc=axel.lin@gmail.com \
--cc=cabarnes@indesign-llc.com \
--cc=cbouatmailru@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=praithatha@nvidia.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