[PATCH v6 8/9] gpio: gpio-aspeed-sgpio: Use generic device property APIs

From
Steven Lee <hidden>
Date
2021-07-12 10:04:23
Also in
linux-arm-kernel, linux-aspeed, linux-gpio, lkml
Reply to
Steven Lee, 2021-07-12
Replace all of_property_read_u32() with device_property_read_u32().

Signed-off-by: Steven Lee <redacted>
Acked-by: Andrew Jeffery <redacted>
---
 drivers/gpio/gpio-aspeed-sgpio.c | 4 ++--
 1 file 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;
-- 
2.17.1
Thread (24 messages) 24 messages, 6 authors, last reply 2021-08-05
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help