From: Jonathan Cameron <jic23@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: linux-iio@vger.kernel.org, Hartmut Knaack <knaack.h@gmx.de>,
Lars-Peter Clausen <lars@metafoo.de>,
Peter Meerwald-Stadler <pmeerw@pmeerw.net>,
Julia Lawall <Julia.Lawall@lip6.fr>
Subject: Re: [PATCH v1] iio: proximity: sx9500: Use devm_gpiod_get()
Date: Sun, 11 Jun 2017 11:33:51 +0100 [thread overview]
Message-ID: <20170611113351.09b6c6b0@kernel.org> (raw)
In-Reply-To: <20170610190821.53499-1-andriy.shevchenko@linux.intel.com>
On Sat, 10 Jun 2017 22:08:21 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> Since index is always 0 replace devm_gpiod_get_index() by devm_gpiod_get().
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Hi Andy,
Good little tidy up. Looks like a classic use for a coccinelle patch
if you have time to take it further. Sort of thing that will sneak in
within future drivers so good to tidy up all cases automatically ;)
Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> drivers/iio/proximity/sx9500.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
> index 9ea147f1a50d..f42b3a1c75ff 100644
> --- a/drivers/iio/proximity/sx9500.c
> +++ b/drivers/iio/proximity/sx9500.c
> @@ -878,8 +878,7 @@ static void sx9500_gpio_probe(struct i2c_client *client,
>
> dev = &client->dev;
>
> - data->gpiod_rst = devm_gpiod_get_index(dev, SX9500_GPIO_RESET,
> - 0, GPIOD_OUT_HIGH);
> + data->gpiod_rst = devm_gpiod_get(dev, SX9500_GPIO_RESET, GPIOD_OUT_HIGH);
> if (IS_ERR(data->gpiod_rst)) {
> dev_warn(dev, "gpio get reset pin failed\n");
> data->gpiod_rst = NULL;
prev parent reply other threads:[~2017-06-11 10:33 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-10 19:08 [PATCH v1] iio: proximity: sx9500: Use devm_gpiod_get() Andy Shevchenko
2017-06-11 10:33 ` Jonathan Cameron [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=20170611113351.09b6c6b0@kernel.org \
--to=jic23@kernel.org \
--cc=Julia.Lawall@lip6.fr \
--cc=andriy.shevchenko@linux.intel.com \
--cc=knaack.h@gmx.de \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.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 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.