From: Joshua Crofts <crofts@kernel.org>
To: Wanhui Fu <fuwh1120@163.com>,
jic23@kernel.org, dlechner@baylibre.com, nuno.sa@analog.com,
andy@kernel.org, bhelgaas@google.com,
giorgitchankvetadze1997@gmail.com, o-takashi@sakamocchi.jp,
kees+treewide@kernel.org, u.kleine-koenig@baylibre.com
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH v3 2/3] iio: adc: twl6030-gpadc: switch to devm_iio_device_register()
Date: Mon, 30 Nov 2026 10:11:42 +0100 [thread overview]
Message-ID: <c0afa76f-0798-44f4-9e90-b757ce88459f@kernel.org> (raw)
In-Reply-To: <20261130030359.2144888-3-fuwh1120@163.com>
On 30-Nov-26 4:03, Wanhui Fu wrote:
> Convert iio_device_register() to devm_iio_device_register().
> This allows dropping the now-empty twl6030_gpadc_remove() and
> the unused platform_set_drvdata() call.
>
> Signed-off-by: Wanhui Fu <fuwh1120@163.com>
> ---
> drivers/iio/adc/twl6030-gpadc.c | 11 +----------
> 1 file changed, 1 insertion(+), 10 deletions(-)
>
> diff --git a/drivers/iio/adc/twl6030-gpadc.c b/drivers/iio/adc/twl6030-gpadc.c
> index 786059cf7513..591c7b3322c7 100644
> --- a/drivers/iio/adc/twl6030-gpadc.c
> +++ b/drivers/iio/adc/twl6030-gpadc.c
> @@ -904,7 +904,6 @@ static int twl6030_gpadc_probe(struct platform_device *pdev)
> gpadc->dev = dev;
> gpadc->pdata = pdata;
>
> - platform_set_drvdata(pdev, indio_dev);
> mutex_init(&gpadc->lock);
You should also switch to devm_mutex_init() since you're doing a devm_*
conversion.
--
Kind regards,
Joshua Crofts
next prev parent reply other threads:[~2026-11-30 9:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-30 3:03 [PATCH v3 0/3] iio: adc: twl6030-gpadc: convert probe/remove cleanup to devm Wanhui Fu
2026-11-30 3:03 ` [PATCH v3 1/3] iio: adc: twl6030-gpadc: use devm_add_action_or_reset() to disable IRQ Wanhui Fu
2026-11-30 9:13 ` Joshua Crofts
2026-11-30 12:18 ` Andy Shevchenko
2026-11-30 3:03 ` [PATCH v3 2/3] iio: adc: twl6030-gpadc: switch to devm_iio_device_register() Wanhui Fu
2026-11-30 9:11 ` Joshua Crofts [this message]
2026-11-30 3:03 ` [PATCH v3 3/3] iio: adc: twl6030-gpadc: delete redundant dev_err() messages in probe Wanhui Fu
2026-11-30 9:14 ` Joshua Crofts
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=c0afa76f-0798-44f4-9e90-b757ce88459f@kernel.org \
--to=crofts@kernel.org \
--cc=andy@kernel.org \
--cc=bhelgaas@google.com \
--cc=dlechner@baylibre.com \
--cc=fuwh1120@163.com \
--cc=giorgitchankvetadze1997@gmail.com \
--cc=jic23@kernel.org \
--cc=kees+treewide@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=o-takashi@sakamocchi.jp \
--cc=u.kleine-koenig@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.