summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohan Hovold <johan@kernel.org>2025-11-26 15:53:28 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-01-16 16:43:04 +0100
commit7831f710553dcda6a67b3fe3f7a9d2f9a7233c3f (patch)
tree97b0ea5d3aaffae149acf7724c3dcdb6fba7c674
parent4c6da2fdc811391c4a5e594c6e976803b54198b7 (diff)
slimbus: core: fix of_slim_get_device() kernel doc
Unlike slim_get_device() the of_slim_get_device() helper does not allocate and register any slimbus devices in case lookup fails. Update the of_slim_get_device() kernel doc to reflect this and add a comment about the helper taking a reference to the returned device. Fixes: e0772de8a48b ("slimbus: core: add of_slim_device_get() helper") Signed-off-by: Johan Hovold <johan@kernel.org> Link: https://patch.msgid.link/20251126145329.5022-6-johan@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/slimbus/core.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/slimbus/core.c b/drivers/slimbus/core.c
index 9402950e7ebd..a2c243e3ad52 100644
--- a/drivers/slimbus/core.c
+++ b/drivers/slimbus/core.c
@@ -408,11 +408,13 @@ static struct slim_device *of_find_slim_device(struct slim_controller *ctrl,
/**
* of_slim_get_device() - get handle to a device using dt node.
*
- * @ctrl: Controller on which this device will be added/queried
+ * @ctrl: Controller on which this device will be queried
* @np: node pointer to device
*
- * Return: pointer to a device if it has already reported. Creates a new
- * device and returns pointer to it if the device has not yet enumerated.
+ * Takes a reference to the embedded struct device which needs to be dropped
+ * after use.
+ *
+ * Return: pointer to a device if it has been registered, otherwise NULL.
*/
struct slim_device *of_slim_get_device(struct slim_controller *ctrl,
struct device_node *np)