From: Jonathan Cameron <jic23@kernel.org>
To: Yangtao Li <frank.li@vivo.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
linux-iio@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] iio: adc: stm32-adc: Use devm_platform_get_and_ioremap_resource()
Date: Sat, 8 Jul 2023 15:34:35 +0100 [thread overview]
Message-ID: <20230708153435.6da5fee5@jic23-huawei> (raw)
In-Reply-To: <20230704095808.33780-1-frank.li@vivo.com>
On Tue, 4 Jul 2023 17:58:08 +0800
Yangtao Li <frank.li@vivo.com> wrote:
> Convert platform_get_resource(), devm_ioremap_resource() to a single
> call to devm_platform_get_and_ioremap_resource(), as this is exactly
> what this function does.
>
> Signed-off-by: Yangtao Li <frank.li@vivo.com>
Applied.
Thanks,
Jonathan
> ---
> drivers/iio/adc/stm32-adc-core.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/iio/adc/stm32-adc-core.c b/drivers/iio/adc/stm32-adc-core.c
> index 48f02dcc81c1..99062a0ba1d9 100644
> --- a/drivers/iio/adc/stm32-adc-core.c
> +++ b/drivers/iio/adc/stm32-adc-core.c
> @@ -723,8 +723,7 @@ static int stm32_adc_probe(struct platform_device *pdev)
> priv->nb_adc_max = priv->cfg->num_adcs;
> spin_lock_init(&priv->common.lock);
>
> - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - priv->common.base = devm_ioremap_resource(&pdev->dev, res);
> + priv->common.base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
> if (IS_ERR(priv->common.base))
> return PTR_ERR(priv->common.base);
> priv->common.phys_base = res->start;
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2023-07-08 14:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-04 9:58 [PATCH] iio: adc: stm32-adc: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-08 14:34 ` 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=20230708153435.6da5fee5@jic23-huawei \
--to=jic23@kernel.org \
--cc=alexandre.torgue@foss.st.com \
--cc=frank.li@vivo.com \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@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