From: Jonathan Cameron <jic23@kernel.org>
To: Cesar Bispo <dm.cesaraugusto@gmail.com>
Cc: linux-iio@vger.kernel.org, Cesar Bispo <cesar.bispo@ime.usp.br>,
GabrIel Ferreira <gabrielfsouza.araujo@usp.br>
Subject: Re: [PATCH 2/2] iio: adc: qcom-pm8xxx-xoadc: modernize single regulator call
Date: Tue, 29 Apr 2025 18:38:29 +0100 [thread overview]
Message-ID: <20250429183829.110fa330@jic23-huawei> (raw)
In-Reply-To: <20250429160526.5934-3-cesar.bispo@ime.usp.br>
On Tue, 29 Apr 2025 13:05:19 -0300
Cesar Bispo <dm.cesaraugusto@gmail.com> wrote:
> Replace a single instance of legacy regulator handling in each driver
> with devm_regulator_get_enable().
> This change improves code clarity and aligns with modern kernel APIs.
>
> Signed-off-by: Cesar Bispo <cesar.bispo@ime.usp.br>
> Co-developed-by: GabrIel Ferreira <gabrielfsouza.araujo@usp.br>
> Signed-off-by: GabrIel Ferreira <gabrielfsouza.araujo@usp.br>
As in previous, this should at the very least give a warning...
> ---
> drivers/iio/adc/qcom-pm8xxx-xoadc.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/qcom-pm8xxx-xoadc.c b/drivers/iio/adc/qcom-pm8xxx-xoadc.c
> index 31f88cf7f7f1..c99d6acac059 100644
> --- a/drivers/iio/adc/qcom-pm8xxx-xoadc.c
> +++ b/drivers/iio/adc/qcom-pm8xxx-xoadc.c
> @@ -911,7 +911,7 @@ static int pm8xxx_xoadc_probe(struct platform_device *pdev)
> adc->map = map;
>
> /* Bring up regulator */
> - adc->vref = devm_regulator_get(dev, "xoadc-ref");
> + adc->vref = devm_regulator_get_enable(dev, "xoadc-ref");
This doesn't return a pointer....
> if (IS_ERR(adc->vref))
> return dev_err_probe(dev, PTR_ERR(adc->vref),
> "failed to get XOADC VREF regulator\n");
prev parent reply other threads:[~2025-04-29 17:38 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-29 16:05 [PATCH 0/2] iio: adc: Modernize legacy regulator calls in drivers Cesar Bispo
2025-04-29 16:05 ` [PATCH 1/2] iio: adc: ad7476: modernize single regulator call Cesar Bispo
2025-04-29 17:37 ` Jonathan Cameron
2025-04-29 16:05 ` [PATCH 2/2] iio: adc: qcom-pm8xxx-xoadc: " Cesar Bispo
2025-04-29 17:38 ` Jonathan Cameron [this message]
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=20250429183829.110fa330@jic23-huawei \
--to=jic23@kernel.org \
--cc=cesar.bispo@ime.usp.br \
--cc=dm.cesaraugusto@gmail.com \
--cc=gabrielfsouza.araujo@usp.br \
--cc=linux-iio@vger.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