[openwrt/openwrt] gpio-button-hotplug: fix 6.2 build failure

LEDE Commits lede-commits at lists.infradead.org
Mon Mar 11 12:18:06 PDT 2024


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7fcbcea75120fbab5adb87b6c63029dfd8812a39

commit 7fcbcea75120fbab5adb87b6c63029dfd8812a39
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Sun Jan 7 03:31:28 2024 +0800

    gpio-button-hotplug: fix 6.2 build failure
    
    devm_gpiod_get_from_of_node() was removed since linux 6.2.
    devm_fwnode_gpiod_get() is the recommended replacement.
    
    Link:
    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/drivers/gpio/gpiolib-devres.c?id=650f2dc970539b3344a98c4bd18efa309e66623b
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
index 522085bb2f..e36494c2fe 100644
--- a/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
+++ b/package/kernel/gpio-button-hotplug/src/gpio-button-hotplug.c
@@ -538,8 +538,9 @@ static int gpio_keys_button_probe(struct platform_device *pdev,
 			struct device_node *child =
 				of_get_next_child(dev->of_node, prev);
 
-			bdata->gpiod = devm_gpiod_get_from_of_node(dev,
-				child, "gpios", 0, GPIOD_IN, desc);
+			bdata->gpiod = devm_fwnode_gpiod_get(dev,
+				of_fwnode_handle(child), NULL, GPIOD_IN,
+				desc);
 
 			prev = child;
 		}




More information about the lede-commits mailing list