From: "Nuno Sá" <noname.nuno@gmail.com>
To: Rosen Penev <rosenp@gmail.com>, linux-iio@vger.kernel.org
Cc: "Eugen Hristev" <eugen.hristev@linaro.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Nicolas Ferre" <nicolas.ferre@microchip.com>,
"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
"moderated list:ARM/Microchip (AT91) SoC support"
<linux-arm-kernel@lists.infradead.org>,
"open list" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: adc: at91-sama5d2_adc: no devm for nvmem_cell_get
Date: Wed, 04 Mar 2026 11:44:45 +0000 [thread overview]
Message-ID: <31e0d644f251ae29063ef5575fcb851034ab6fd5.camel@gmail.com> (raw)
In-Reply-To: <20260304041843.7709-1-rosenp@gmail.com>
On Tue, 2026-03-03 at 20:18 -0800, Rosen Penev wrote:
> There is absolutely no reason to pospone cleanup of this post driver
> removal. Just do it immediately.
>
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
I guess we do not have that many users for nvmem_cell_get(), otherwise a new __free(nvmem_cell)
could make sense. Anyways not related:
Reviewed-by: Nuno Sá <nuno.sa@analog.com>
> drivers/iio/adc/at91-sama5d2_adc.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/at91-sama5d2_adc.c b/drivers/iio/adc/at91-sama5d2_adc.c
> index 69bb49434f90..255970b2e747 100644
> --- a/drivers/iio/adc/at91-sama5d2_adc.c
> +++ b/drivers/iio/adc/at91-sama5d2_adc.c
> @@ -2259,7 +2259,7 @@ static int at91_adc_temp_sensor_init(struct at91_adc_state *st,
> return 0;
>
> /* Get the calibration data from NVMEM. */
> - temp_calib = devm_nvmem_cell_get(dev, "temperature_calib");
> + temp_calib = nvmem_cell_get(dev, "temperature_calib");
> if (IS_ERR(temp_calib)) {
> ret = PTR_ERR(temp_calib);
> if (ret != -ENOENT)
> @@ -2268,6 +2268,7 @@ static int at91_adc_temp_sensor_init(struct at91_adc_state *st,
> }
>
> buf = nvmem_cell_read(temp_calib, &len);
> + nvmem_cell_put(temp_calib);
> if (IS_ERR(buf)) {
> dev_err(dev, "Failed to read calibration data!\n");
> return PTR_ERR(buf);
next prev parent reply other threads:[~2026-03-04 11:44 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-04 4:18 [PATCH] iio: adc: at91-sama5d2_adc: no devm for nvmem_cell_get Rosen Penev
2026-03-04 6:56 ` Eugen Hristev
2026-03-04 11:44 ` Nuno Sá [this message]
2026-03-07 13:13 ` Jonathan Cameron
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=31e0d644f251ae29063ef5575fcb851034ab6fd5.camel@gmail.com \
--to=noname.nuno@gmail.com \
--cc=alexandre.belloni@bootlin.com \
--cc=andy@kernel.org \
--cc=claudiu.beznea@tuxon.dev \
--cc=dlechner@baylibre.com \
--cc=eugen.hristev@linaro.org \
--cc=jic23@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nicolas.ferre@microchip.com \
--cc=nuno.sa@analog.com \
--cc=rosenp@gmail.com \
/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