Skip to content

Commit ade7941

Browse files
jhovoldlag-linaro
authored andcommitted
spmi: document spmi_device_from_of() refcounting
Add a comment documenting that the spmi_device_from_of() takes a reference to the embedded struct device that needs to be dropped after use. Signed-off-by: Johan Hovold <[email protected]> Acked-by: Stephen Boyd <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Lee Jones <[email protected]>
1 parent 36af195 commit ade7941

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/spmi/spmi.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,9 @@ static struct bus_type spmi_bus_type = {
392392
*
393393
* @np: device node
394394
*
395+
* Takes a reference to the embedded struct device which needs to be dropped
396+
* after use.
397+
*
395398
* Returns the struct spmi_device associated with a device node or NULL.
396399
*/
397400
struct spmi_device *spmi_device_from_of(struct device_node *np)

0 commit comments

Comments
 (0)