diff options
Diffstat (limited to 'drivers/iio/gyro/bmg160.c')
-rw-r--r-- | drivers/iio/gyro/bmg160.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/iio/gyro/bmg160.c b/drivers/iio/gyro/bmg160.c index ccf3ea7e1afa..4415f55d26b6 100644 --- a/drivers/iio/gyro/bmg160.c +++ b/drivers/iio/gyro/bmg160.c @@ -1001,16 +1001,12 @@ static int bmg160_gpio_probe(struct i2c_client *client, dev = &client->dev; /* data ready gpio interrupt pin */ - gpio = devm_gpiod_get_index(dev, BMG160_GPIO_NAME, 0); + gpio = devm_gpiod_get_index(dev, BMG160_GPIO_NAME, 0, GPIOD_IN); if (IS_ERR(gpio)) { dev_err(dev, "acpi gpio get index failed\n"); return PTR_ERR(gpio); } - ret = gpiod_direction_input(gpio); - if (ret) - return ret; - ret = gpiod_to_irq(gpio); dev_dbg(dev, "GPIO resource, no:%d irq:%d\n", desc_to_gpio(gpio), ret); |