[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251126145329.5022-7-johan@kernel.org>
Date: Wed, 26 Nov 2025 15:53:29 +0100
From: Johan Hovold <johan@...nel.org>
To: Srinivas Kandagatla <srini@...nel.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-sound@...r.kernel.org,
linux-kernel@...r.kernel.org,
Johan Hovold <johan@...nel.org>
Subject: [PATCH 6/6] slimbus: core: clean up of_slim_get_device()
Clean up of_find_slim_device() by folding in the of_find_slim_device()
helper.
Signed-off-by: Johan Hovold <johan@...nel.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
Powered by blists - more mailing lists