power: supply: bq25890: Use gpiod_get()
PATCH 1/1 power: supply: bq25890: Use gpiod_get()
Since index is always 0, replace gpiod_get_index() by gpiod_get().
Signed-off-by Andy Shevchenko <[email protected]>
--- drivers/power/supply/bq25890_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/power/supply/bq25890_charger.c +1 -1
@@ -723,7 +723,7 @@ static int bq25890_irq_probe(struct bq25890_device *bq) {struct gpio_desc *irq; - irq =devm_gpiod_get_index (bq->dev,BQ25890_IRQ_PIN ,0 ,GPIOD_IN ); + irq =devm_gpiod_get (bq->dev,BQ25890_IRQ_PIN ,GPIOD_IN );if (IS_ERR (irq)) {dev_err (bq->dev,"Could not probe irq pin.\n" );return PTR_ERR (irq);
Signature · 1 line
2.11.0
Quoted 2 lines · Andy Shevchenko
Since index is always 0, replace
gpiod_get_index()bygpiod_get().
Any comments on this?
I would reduce as much as possible use of gpiod_get_index*() to sort out things later.
Quoted 21 lines
Signed-off-by Andy Shevchenko <[email protected]>---
drivers/power/supply/bq25890_charger.c | 2 +-1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/supply/bq25890_charger.c +0
-0@@ -723,7 +723,7 @@ static int bq25890_irq_probe(struct bq25890_device *bq) { struct gpio_desc *irq;drivers/power/supply/bq25890_charger.c +0
-1- irq = devm_gpiod_get_index(bq->dev, BQ25890_IRQ_PIN, 0,
GPIOD_IN);drivers/power/supply/bq25890_charger.c +1
-0+ irq =devm_gpiod_get (bq->dev,BQ25890_IRQ_PIN ,GPIOD_IN );if (
IS_ERR(irq)) {
dev_err(bq->dev, "Could not probe irq pin.\n"); returnPTR_ERR(irq);
Signature · 2 lines
Andy Shevchenko <[email protected]> Intel Finland Oy
Sebastian Reichel
maintainerHi,
Quoted 12 lines · Andy Shevchenko
Since index is always 0, replace
gpiod_get_index()bygpiod_get().Signed-off-by Andy Shevchenko <[email protected]>--- drivers/power/supply/bq25890_charger.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/power/supply/bq25890_charger.c +0
-0
drivers/power/supply/bq25890_charger.c static int bq25890_irq_probe(struct bq25890_device *bq) · line 729
Quoted 8 lines
drivers/power/supply/bq25890_charger.c +1
-1@@ -723,7 +723,7 @@ static int bq25890_irq_probe(struct bq25890_device *bq) {struct gpio_desc *irq; - irq =devm_gpiod_get_index (bq->dev,BQ25890_IRQ_PIN ,0 ,GPIOD_IN ); + irq =devm_gpiod_get (bq->dev,BQ25890_IRQ_PIN ,GPIOD_IN );if (IS_ERR (irq)) {dev_err (bq->dev,"Could not probe irq pin.\n" );return PTR_ERR (irq);
Thanks, queued.
-- Sebastian