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 <johan+linaro@kernel.org> Acked-by: Stephen Boyd <sboyd@kernel.org> Link: https://lore.kernel.org/r/20231003152927.15000-5-johan+linaro@kernel.org Signed-off-by: Lee Jones <lee@kernel.org>
1 parent 36af195 commit ade7941

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

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)