summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2017-06-10 22:08:21 +0300
committerJonathan Cameron <jic23@kernel.org>2017-06-11 15:07:34 +0100
commitc306dbd88c3d1a9f41c81d38e8f756d25958d575 (patch)
tree08986f818dc8ca5e7b71ef5881481a6661e64b9b
parent7af1a06776da9e943126c2dd740a18710ecd66df (diff)
downloadop-kernel-dev-c306dbd88c3d1a9f41c81d38e8f756d25958d575.zip
op-kernel-dev-c306dbd88c3d1a9f41c81d38e8f756d25958d575.tar.gz
iio: proximity: sx9500: Use devm_gpiod_get()
Since index is always 0 replace devm_gpiod_get_index() by devm_gpiod_get(). Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
-rw-r--r--drivers/iio/proximity/sx9500.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c
index 9ea147f..f42b3a1 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;
OpenPOWER on IntegriCloud