Commit ade7941a authored by Johan Hovold's avatar Johan Hovold Committed by Lee Jones

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: default avatarJohan Hovold <johan+linaro@kernel.org>
Acked-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20231003152927.15000-5-johan+linaro@kernel.orgSigned-off-by: default avatarLee Jones <lee@kernel.org>
parent 36af195f
...@@ -392,6 +392,9 @@ static struct bus_type spmi_bus_type = { ...@@ -392,6 +392,9 @@ static struct bus_type spmi_bus_type = {
* *
* @np: device node * @np: device node
* *
* Takes a reference to the embedded struct device which needs to be dropped
* after use.
*
* Returns the struct spmi_device associated with a device node or NULL. * Returns the struct spmi_device associated with a device node or NULL.
*/ */
struct spmi_device *spmi_device_from_of(struct device_node *np) struct spmi_device *spmi_device_from_of(struct device_node *np)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment