[PATCH 6/6] slimbus: core: clean up of_slim_get_device()

Johan Hovold posted 6 patches 5 days, 7 hours ago
[PATCH 6/6] slimbus: core: clean up of_slim_get_device()
Posted by Johan Hovold 5 days, 7 hours ago
Clean up of_find_slim_device() by folding in the of_find_slim_device()
helper.

Signed-off-by: Johan Hovold <johan@kernel.org>
---
 drivers/slimbus/core.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index a2c243e3ad52..5079d3271ee8 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -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);
 
-- 
2.51.2