linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johan Hovold <johan+linaro@kernel.org>
To: Lee Jones <lee@kernel.org>
Cc: Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	Stephen Boyd <sboyd@kernel.org>,
	Caleb Connolly <caleb.connolly@linaro.org>,
	linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
	Johan Hovold <johan+linaro@kernel.org>
Subject: [PATCH 4/5] spmi: document spmi_device_from_of() refcounting
Date: Tue,  3 Oct 2023 17:29:26 +0200	[thread overview]
Message-ID: <20231003152927.15000-5-johan+linaro@kernel.org> (raw)
In-Reply-To: <20231003152927.15000-1-johan+linaro@kernel.org>

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>
---
 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


  parent reply	other threads:[~2023-10-03 15:29 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-03 15:29 [PATCH 0/5] mfd: qcom-spmi-pmic: fix revid implementation Johan Hovold
2023-10-03 15:29 ` [PATCH 1/5] mfd: qcom-spmi-pmic: fix reference leaks in revid helper Johan Hovold
2023-10-03 15:29 ` [PATCH 2/5] mfd: qcom-spmi-pmic: fix revid implementation Johan Hovold
2023-10-03 15:29 ` [PATCH 3/5] mfd: qcom-spmi-pmic: switch to EXPORT_SYMBOL_GPL() Johan Hovold
2023-10-06 23:53   ` Konrad Dybcio
2023-10-03 15:29 ` Johan Hovold [this message]
2023-10-24  1:58   ` [PATCH 4/5] spmi: document spmi_device_from_of() refcounting Stephen Boyd
2023-10-25 12:17   ` (subset) " Lee Jones
2023-10-03 15:29 ` [PATCH 5/5] spmi: rename spmi device lookup helper Johan Hovold
2023-10-24  1:58   ` Stephen Boyd
2023-10-25 12:17   ` (subset) " Lee Jones
2023-10-03 15:57 ` [PATCH 0/5] mfd: qcom-spmi-pmic: fix revid implementation Caleb Connolly
2023-10-12 10:20 ` (subset) " Lee Jones
2023-10-13  9:55   ` Johan Hovold
2023-10-13 10:15     ` Lee Jones
2023-10-23  7:05     ` Need SPMI ack (was: Re: (subset) [PATCH 0/5] mfd: qcom-spmi-pmic: fix revid implementation) Johan Hovold
2023-10-25 12:17 ` (subset) [PATCH 0/5] mfd: qcom-spmi-pmic: fix revid implementation Lee Jones
2023-10-25 12:18   ` Lee Jones
2023-10-25 12:24     ` Johan Hovold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231003152927.15000-5-johan+linaro@kernel.org \
    --to=johan+linaro@kernel.org \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=caleb.connolly@linaro.org \
    --cc=konrad.dybcio@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).