mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-20 18:54:09 +08:00
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>
This commit is contained in:
parent
7af1a06776
commit
c306dbd88c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user