[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20231003152927.15000-5-johan+linaro@kernel.org>
Date: Tue, 3 Oct 2023 17:29:26 +0200
From: Johan Hovold <johan+linaro@...nel.org>
To: Lee Jones <lee@...nel.org>
Cc: Andy Gross <agross@...nel.org>,
Bjorn Andersson <andersson@...nel.org>,
Konrad Dybcio <konrad.dybcio@...aro.org>,
Stephen Boyd <sboyd@...nel.org>,
Caleb Connolly <caleb.connolly@...aro.org>,
linux-arm-msm@...r.kernel.org, linux-kernel@...r.kernel.org,
Johan Hovold <johan+linaro@...nel.org>
Subject: [PATCH 4/5] 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@...nel.org>
---
drivers/spmi/spmi.c | 3 +++
1 file changed, 3 insertions(+)
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)
--
2.41.0
Powered by blists - more mailing lists