Skip to content

Commit 1effc71

Browse files
pdp7esmil
authored andcommitted
gpio: starfive-jh7100: Fix "registered 0 GPIOs" message
[Emil: remove unused local variable too] Signed-off-by: Drew Fustini <drew@beagleboard.org> Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
1 parent 12ab4e5 commit 1effc71

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

drivers/gpio/gpio-starfive-jh7100.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ static int starfive_gpio_probe(struct platform_device *pdev)
451451
struct starfive_gpio *chip;
452452
struct gpio_irq_chip *girq;
453453
struct resource *res;
454-
int irq, ret, ngpio;
454+
int irq, ret;
455455

456456
chip = devm_kzalloc(dev, sizeof(*chip), GFP_KERNEL);
457457
if (!chip)
@@ -511,7 +511,7 @@ static int starfive_gpio_probe(struct platform_device *pdev)
511511

512512
writel_relaxed(1, chip->base + GPIO_EN);
513513

514-
dev_info(dev, "StarFive GPIO chip registered %d GPIOs\n", ngpio);
514+
dev_info(dev, "StarFive GPIO chip registered %d GPIOs\n", chip->gc.ngpio);
515515

516516
return 0;
517517
}

0 commit comments

Comments
 (0)