[openwrt/openwrt] ath79: fix build error for downstream gpio drivers

LEDE Commits lede-commits at lists.infradead.org
Thu May 9 14:58:45 PDT 2024


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/24693ac7e54d913153ec6e89a13903937e33ff4d

commit 24693ac7e54d913153ec6e89a13903937e33ff4d
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Mon Apr 29 20:26:17 2024 +0000

    ath79: fix build error for downstream gpio drivers
    
    Initialize fwnode instead of the deprecated of_node.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 target/linux/ath79/files/drivers/gpio/gpio-latch.c     | 4 ++--
 target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/ath79/files/drivers/gpio/gpio-latch.c b/target/linux/ath79/files/drivers/gpio/gpio-latch.c
index 68f9290b2a..5518184caa 100644
--- a/target/linux/ath79/files/drivers/gpio/gpio-latch.c
+++ b/target/linux/ath79/files/drivers/gpio/gpio-latch.c
@@ -110,7 +110,7 @@ static int gpio_latch_probe(struct platform_device *pdev)
 	struct gpio_latch_chip *glc;
 	struct gpio_chip *gc;
 	struct device *dev = &pdev->dev;
-	struct device_node *of_node = dev->of_node;
+	struct fwnode_handle *fwnode = dev->fwnode;
 	int i, n;
 
 	glc = devm_kzalloc(dev, sizeof(*glc), GFP_KERNEL);
@@ -158,7 +158,7 @@ static int gpio_latch_probe(struct platform_device *pdev)
 	gc->get = gpio_latch_get;
 	gc->set = gpio_latch_set;
 	gc->direction_output = gpio_latch_direction_output;
-	gc->of_node = of_node;
+	gc->fwnode = fwnode;
 
 	platform_set_drvdata(pdev, glc);
 
diff --git a/target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c b/target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c
index ee8359e774..8996b2a906 100644
--- a/target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c
+++ b/target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c
@@ -144,7 +144,7 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
 	struct gpio_rb91x_key *drvdata;
 	struct gpio_chip *gc;
 	struct device *dev = &pdev->dev;
-	struct device_node *of_node = dev->of_node;
+	struct fwnode_handle *fwnode = dev->fwnode;
 	int r;
 
 	drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
@@ -172,7 +172,7 @@ static int gpio_rb91x_key_probe(struct platform_device *pdev)
 	gc->set = gpio_rb91x_key_set;
 	gc->direction_output = gpio_rb91x_key_direction_output;
 	gc->direction_input = gpio_rb91x_key_direction_input;
-	gc->of_node = of_node;
+	gc->fwnode = fwnode;
 
 	platform_set_drvdata(pdev, drvdata);
 




More information about the lede-commits mailing list