ath79: fix build error for downstream gpio drivers
authorShiji Yang <yangshiji66@qq.com>
Mon, 29 Apr 2024 20:26:17 +0000 (20:26 +0000)
committerHauke Mehrtens <hauke@hauke-m.de>
Thu, 9 May 2024 21:51:14 +0000 (23:51 +0200)
Initialize fwnode instead of the deprecated of_node.

Signed-off-by: Shiji Yang <yangshiji66@qq.com>
target/linux/ath79/files/drivers/gpio/gpio-latch.c
target/linux/ath79/files/drivers/gpio/gpio-rb91x-key.c

index 68f9290b2a5c649d3fbe623bd00709b6f7e5a0c4..5518184caa0f8a1162e5b8682891c14b0cd7991c 100644 (file)
@@ -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);
 
index ee8359e7742f16100712f20983767cbdde093275..8996b2a9060d78fa839e2b7cf40e745958dd0824 100644 (file)
@@ -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);