]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iio: proximity: sx9500: Use devm_gpiod_get()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Sat, 10 Jun 2017 19:08:21 +0000 (22:08 +0300)
committerJonathan Cameron <jic23@kernel.org>
Sun, 11 Jun 2017 14:07:34 +0000 (15:07 +0100)
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>
drivers/iio/proximity/sx9500.c

index 9ea147f1a50d10ee13412d41bac823f605bfc1b2..f42b3a1c75fffbd9adf902fca3e395dd0a974907 100644 (file)
@@ -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;