diff options
author | Johan Hovold <johan+linaro@kernel.org> | 2023-10-03 18:29:26 +0300 |
---|---|---|
committer | Lee Jones <lee@kernel.org> | 2023-11-01 13:02:18 +0300 |
commit | ade7941a478e797f781040f96ae530a0abf7cbfe (patch) | |
tree | 26d9034b2888164734438584486de5e9cc1f53f0 /drivers | |
parent | 36af195f7f35c205f716cddf5a8a8954c2e70bff (diff) | |
download | linux-ade7941a478e797f781040f96ae530a0abf7cbfe.tar.xz |
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/spmi/spmi.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/spmi/spmi.c b/drivers/spmi/spmi.c index 7313d4c18a04..ca2fd4d72fa6 100644 --- a/drivers/spmi/spmi.c +++ b/drivers/spmi/spmi.c @@ -392,6 +392,9 @@ static struct bus_type spmi_bus_type = { * * @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. */ struct spmi_device *spmi_device_from_of(struct device_node *np) |