All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Sebastian Reichel <sre@kernel.org>, linux-pm@vger.kernel.org
Subject: Re: [PATCH v1] power: supply: bq25890: Use gpiod_get()
Date: Tue, 28 Feb 2017 17:13:20 +0200	[thread overview]
Message-ID: <1488294800.20145.63.camel@linux.intel.com> (raw)
In-Reply-To: <20170220171223.40799-1-andriy.shevchenko@linux.intel.com>

On Mon, 2017-02-20 at 19:12 +0200, Andy Shevchenko wrote:
> Since index is always 0, replace gpiod_get_index() by gpiod_get().
> 

Any comments on this?

I would reduce as much as possible use of gpiod_get_index*() to sort out
things later.

> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
>  drivers/power/supply/bq25890_charger.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/power/supply/bq25890_charger.c
> b/drivers/power/supply/bq25890_charger.c
> index f993a55cde20..8e2c41ded171 100644
> --- a/drivers/power/supply/bq25890_charger.c
> +++ b/drivers/power/supply/bq25890_charger.c
> @@ -723,7 +723,7 @@ static int bq25890_irq_probe(struct bq25890_device
> *bq)
>  {
>  	struct gpio_desc *irq;
>  
> -	irq = devm_gpiod_get_index(bq->dev, BQ25890_IRQ_PIN, 0,
> GPIOD_IN);
> +	irq = devm_gpiod_get(bq->dev, BQ25890_IRQ_PIN, GPIOD_IN);
>  	if (IS_ERR(irq)) {
>  		dev_err(bq->dev, "Could not probe irq pin.\n");
>  		return PTR_ERR(irq);

-- 
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy

  reply	other threads:[~2017-02-28 15:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-20 17:12 [PATCH v1] power: supply: bq25890: Use gpiod_get() Andy Shevchenko
2017-02-28 15:13 ` Andy Shevchenko [this message]
2017-03-15 21:18 ` Sebastian Reichel

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=1488294800.20145.63.camel@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=linux-pm@vger.kernel.org \
    --cc=sre@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.