summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/power/bq25890_charger.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/power/bq25890_charger.c b/drivers/power/bq25890_charger.c
index 16b7c7bc987d..f993a55cde20 100644
--- a/drivers/power/bq25890_charger.c
+++ b/drivers/power/bq25890_charger.c
@@ -721,19 +721,14 @@ static int bq25890_usb_notifier(struct notifier_block *nb, unsigned long val,
static int bq25890_irq_probe(struct bq25890_device *bq)
{
- int ret;
struct gpio_desc *irq;
- irq = devm_gpiod_get_index(bq->dev, BQ25890_IRQ_PIN, 0);
+ irq = devm_gpiod_get_index(bq->dev, BQ25890_IRQ_PIN, 0, GPIOD_IN);
if (IS_ERR(irq)) {
dev_err(bq->dev, "Could not probe irq pin.\n");
return PTR_ERR(irq);
}
- ret = gpiod_direction_input(irq);
- if (ret < 0)
- return ret;
-
return gpiod_to_irq(irq);
}