提交 1f857b67 编写于 作者: S Steven Lee 提交者: Bartosz Golaszewski

gpio: gpio-aspeed-sgpio: Use generic device property APIs

Replace all of_property_read_u32() with device_property_read_u32().
Signed-off-by: NSteven Lee <steven_lee@aspeedtech.com>
Acked-by: NAndrew Jeffery <andrew@aj.id.au>
Reviewed-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NBartosz Golaszewski <bgolaszewski@baylibre.com>
上级 09ac953b
......@@ -533,13 +533,13 @@ static int __init aspeed_sgpio_probe(struct platform_device *pdev)
pin_mask = pdata->pin_mask;
rc = of_property_read_u32(pdev->dev.of_node, "ngpios", &nr_gpios);
rc = device_property_read_u32(&pdev->dev, "ngpios", &nr_gpios);
if (rc < 0) {
dev_err(&pdev->dev, "Could not read ngpios property\n");
return -EINVAL;
}
rc = of_property_read_u32(pdev->dev.of_node, "bus-frequency", &sgpio_freq);
rc = device_property_read_u32(&pdev->dev, "bus-frequency", &sgpio_freq);
if (rc < 0) {
dev_err(&pdev->dev, "Could not read bus-frequency property\n");
return -EINVAL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册