]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
leds: led-class: Switch to using class_find_device_by_fwnode()
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Mon, 23 Mar 2026 01:54:23 +0000 (18:54 -0700)
committerLee Jones <lee@kernel.org>
Tue, 31 Mar 2026 10:29:14 +0000 (11:29 +0100)
In preparation to class_find_device_by_of_node() going away switch to
using class_find_device_by_fwnode().

Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Link: https://patch.msgid.link/20260322-remove-device-find-by-of-node-v1-5-b72eb22a1215@gmail.com
Signed-off-by: Lee Jones <lee@kernel.org>
drivers/leds/led-class.c

index d34a19453560458a0fbc80c92ec06b1e86124566..8d7ec9ccb17359f06f40b6faf455d671b12f26da 100644 (file)
@@ -273,7 +273,7 @@ static struct led_classdev *of_led_get(struct device_node *np, int index,
        if (!led_node)
                return ERR_PTR(-ENOENT);
 
-       led_dev = class_find_device_by_of_node(&leds_class, led_node);
+       led_dev = class_find_device_by_fwnode(&leds_class, of_fwnode_handle(led_node));
        of_node_put(led_node);
 
        return led_module_get(led_dev);