mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 05:36:43 +07:00
gpio: em: Use dynamic allocation of GPIOs
Use dynamic allocation of GPIOs instead of looking at the gpio%u alias in DT. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
86256d1fce
commit
fcb8bd4702
@ -330,12 +330,7 @@ static int em_gio_probe(struct platform_device *pdev)
|
|||||||
goto err0;
|
goto err0;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = of_alias_get_id(pdev->dev.of_node, "gpio");
|
pdata->gpio_base = -1;
|
||||||
if (ret < 0) {
|
|
||||||
dev_err(&pdev->dev, "Couldn't get OF id\n");
|
|
||||||
goto err0;
|
|
||||||
}
|
|
||||||
pdata->gpio_base = ret * 32; /* 32 GPIOs per instance */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gpio_chip = &p->gpio_chip;
|
gpio_chip = &p->gpio_chip;
|
||||||
|
Loading…
Reference in New Issue
Block a user