public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Cai Huoqing <caihuoqing@baidu.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	Heiko Stuebner <heiko@sntech.de>, <linux-iio@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<linux-rockchip@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] iio: adc: rockchip_saradc: Make use of the helper function devm_platform_ioremap_resource()
Date: Sun, 19 Sep 2021 18:34:47 +0100	[thread overview]
Message-ID: <20210919183447.33adf804@jic23-huawei> (raw)
In-Reply-To: <20210908105631.1474-1-caihuoqing@baidu.com>

On Wed, 8 Sep 2021 18:56:30 +0800
Cai Huoqing <caihuoqing@baidu.com> wrote:

> Use the devm_platform_ioremap_resource() helper instead of
> calling platform_get_resource() and devm_ioremap_resource()
> separately
> 
> Signed-off-by: Cai Huoqing <caihuoqing@baidu.com>

Hi Cai,

Applied to the togreg branch of iio.git and pushed out as testing for 0-day to
see if it can find anything we missed.

Thanks,

Jonathan

> ---
>  drivers/iio/adc/rockchip_saradc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/rockchip_saradc.c b/drivers/iio/adc/rockchip_saradc.c
> index a237fe469a30..a56a0d7337ca 100644
> --- a/drivers/iio/adc/rockchip_saradc.c
> +++ b/drivers/iio/adc/rockchip_saradc.c
> @@ -319,7 +319,6 @@ static int rockchip_saradc_probe(struct platform_device *pdev)
>  	struct rockchip_saradc *info = NULL;
>  	struct device_node *np = pdev->dev.of_node;
>  	struct iio_dev *indio_dev = NULL;
> -	struct resource	*mem;
>  	const struct of_device_id *match;
>  	int ret;
>  	int irq;
> @@ -348,8 +347,7 @@ static int rockchip_saradc_probe(struct platform_device *pdev)
>  		return -EINVAL;
>  	}
>  
> -	mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> -	info->regs = devm_ioremap_resource(&pdev->dev, mem);
> +	info->regs = devm_platform_ioremap_resource(pdev, 0);
>  	if (IS_ERR(info->regs))
>  		return PTR_ERR(info->regs);
>  


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2021-09-19 17:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-08 10:56 [PATCH] iio: adc: rockchip_saradc: Make use of the helper function devm_platform_ioremap_resource() Cai Huoqing
2021-09-19 17: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=20210919183447.33adf804@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=caihuoqing@baidu.com \
    --cc=heiko@sntech.de \
    --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-rockchip@lists.infradead.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