]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
slimbus: core: clean up of_slim_get_device()
authorJohan Hovold <johan@kernel.org>
Wed, 26 Nov 2025 14:53:29 +0000 (15:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Jan 2026 15:43:05 +0000 (16:43 +0100)
Clean up of_find_slim_device() by folding in the of_find_slim_device()
helper.

Signed-off-by: Johan Hovold <johan@kernel.org>
Link: https://patch.msgid.link/20251126145329.5022-7-johan@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/slimbus/core.c

index a2c243e3ad527bea614084108c5c01dde7b0104e..5079d3271ee82b1387382ae89d361d28cceb94ba 100644 (file)
@@ -390,21 +390,6 @@ struct slim_device *slim_get_device(struct slim_controller *ctrl,
 }
 EXPORT_SYMBOL_GPL(slim_get_device);
 
-static struct slim_device *of_find_slim_device(struct slim_controller *ctrl,
-                                              struct device_node *np)
-{
-       struct slim_device *sbdev;
-       struct device *dev;
-
-       dev = device_find_child(ctrl->dev, np, device_match_of_node);
-       if (dev) {
-               sbdev = to_slim_device(dev);
-               return sbdev;
-       }
-
-       return NULL;
-}
-
 /**
  * of_slim_get_device() - get handle to a device using dt node.
  *
@@ -419,7 +404,16 @@ static struct slim_device *of_find_slim_device(struct slim_controller *ctrl,
 struct slim_device *of_slim_get_device(struct slim_controller *ctrl,
                                       struct device_node *np)
 {
-       return of_find_slim_device(ctrl, np);
+       struct slim_device *sbdev;
+       struct device *dev;
+
+       dev = device_find_child(ctrl->dev, np, device_match_of_node);
+       if (dev) {
+               sbdev = to_slim_device(dev);
+               return sbdev;
+       }
+
+       return NULL;
 }
 EXPORT_SYMBOL_GPL(of_slim_get_device);