Skip to content

Commit 7831f71

Browse files
jhovoldgregkh
authored andcommitted
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: e0772de ("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>
1 parent 4c6da2f commit 7831f71

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

drivers/slimbus/core.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,11 +408,13 @@ static struct slim_device *of_find_slim_device(struct slim_controller *ctrl,
408408
/**
409409
* of_slim_get_device() - get handle to a device using dt node.
410410
*
411-
* @ctrl: Controller on which this device will be added/queried
411+
* @ctrl: Controller on which this device will be queried
412412
* @np: node pointer to device
413413
*
414-
* Return: pointer to a device if it has already reported. Creates a new
415-
* device and returns pointer to it if the device has not yet enumerated.
414+
* Takes a reference to the embedded struct device which needs to be dropped
415+
* after use.
416+
*
417+
* Return: pointer to a device if it has been registered, otherwise NULL.
416418
*/
417419
struct slim_device *of_slim_get_device(struct slim_controller *ctrl,
418420
struct device_node *np)

0 commit comments

Comments
 (0)