Skip to content

Commit

Permalink
gpio: starfive-jh7100: Fix "registered 0 GPIOs" message
Browse files Browse the repository at this point in the history
[Emil: remove unused local variable too]

Signed-off-by: Drew Fustini <[email protected]>
Signed-off-by: Emil Renner Berthing <[email protected]>
  • Loading branch information
pdp7 authored and esmil committed Jul 8, 2021
1 parent 12ab4e5 commit 1effc71
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/gpio/gpio-starfive-jh7100.c
Original file line number Diff line number Diff line change
Expand Up @@ -451,7 +451,7 @@ static int starfive_gpio_probe(struct platform_device *pdev)
struct starfive_gpio *chip;
struct gpio_irq_chip *girq;
struct resource *res;
int irq, ret, ngpio;
int irq, ret;

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

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

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

return 0;
}
Expand Down

0 comments on commit 1effc71

Please sign in to comment.