summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Lee <steven_lee@aspeedtech.com>2021-07-12 13:03:15 +0300
committerJae Hyun Yoo <jae.hyun.yoo@linux.intel.com>2021-10-20 01:10:40 +0300
commit20c2d21d82385ae7ea2f832393eeaed607a168dc (patch)
treeaf3fc56f983388f5f59c87f3b41ac22d2079ab87
parentc8bc8511c75d01ffb5d732591ac681dfee0e1a34 (diff)
downloadlinux-20c2d21d82385ae7ea2f832393eeaed607a168dc.tar.xz
gpio: gpio-aspeed-sgpio: Use generic device property APIs
Replace all of_property_read_u32() with device_property_read_u32(). Signed-off-by: Steven Lee <steven_lee@aspeedtech.com> Acked-by: Andrew Jeffery <andrew@aj.id.au> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
-rw-r--r--drivers/gpio/gpio-aspeed-sgpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-aspeed-sgpio.c b/drivers/gpio/gpio-aspeed-sgpio.c
index 6b3695197c97..b3d05fc724f0 100644
--- a/drivers/gpio/gpio-aspeed-sgpio.c
+++ b/drivers/gpio/gpio-aspeed-sgpio.c
@@ -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;