public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: jic23@kernel.org, linux-iio@vger.kernel.org
Cc: Jonathan Cameron <Jonathan.Cameron@huawei.com>,
	"cpgs (cpgs@samsung.com)" <cpgs@samsung.com>
Subject: Re: [PATCH 2/2] iio: adc: exynos: use devm_platform_ioremap_resource
Date: Mon, 14 Oct 2019 11:18:58 +0900	[thread overview]
Message-ID: <857068247.21571023201523.JavaMail.epsvc@epcpadp1> (raw)
In-Reply-To: <20191013123524.1821390-2-jic23@kernel.org>

Hi,

On 19. 10. 13. 오후 9:35, jic23@kernel.org wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Reduce local boilerplate.
> Identified by coccinelle
> drivers/iio/adc/exynos_adc.c:792:1-11: WARNING: Use devm_platform_ioremap_resource for info -> regs
> 
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  drivers/iio/adc/exynos_adc.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/iio/adc/exynos_adc.c b/drivers/iio/adc/exynos_adc.c
> index b5a497381452..2df7d057b249 100644
> --- a/drivers/iio/adc/exynos_adc.c
> +++ b/drivers/iio/adc/exynos_adc.c
> @@ -769,7 +769,6 @@ static int exynos_adc_probe(struct platform_device *pdev)
>  	struct device_node *np = pdev->dev.of_node;
>  	struct s3c2410_ts_mach_info *pdata = dev_get_platdata(&pdev->dev);
>  	struct iio_dev *indio_dev = NULL;
> -	struct resource	*mem;
>  	bool has_ts = false;
>  	int ret = -ENODEV;
>  	int irq;
> @@ -788,8 +787,7 @@ static int exynos_adc_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);
>  
> 

Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>

-- 
Best Regards,
Chanwoo Choi
Samsung Electronics


  reply	other threads:[~2019-10-14  3:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20191013123734epcas4p138622f17adc5c3baaeba8eb8f4cff1bb@epcas4p1.samsung.com>
2019-10-13 12:35 ` [PATCH 1/2] iio: adc: exynos: Drop a stray semicolon jic23
2019-10-13 12:35   ` [PATCH 2/2] iio: adc: exynos: use devm_platform_ioremap_resource jic23
2019-10-14  2:18     ` Chanwoo Choi [this message]
2019-10-18 19:00       ` Jonathan Cameron
2019-10-14  2:18   ` [PATCH 1/2] iio: adc: exynos: Drop a stray semicolon Chanwoo Choi
2019-10-18 18:59     ` 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=857068247.21571023201523.JavaMail.epsvc@epcpadp1 \
    --to=cw00.choi@samsung.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=cpgs@samsung.com \
    --cc=jic23@kernel.org \
    --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