提交 fcb8bd47 编写于 作者: G Geert Uytterhoeven 提交者: Linus Walleij

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: NGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 86256d1f
...@@ -330,12 +330,7 @@ static int em_gio_probe(struct platform_device *pdev) ...@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册