Message ID | 20191013123524.1821390-2-jic23@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [1/2] iio: adc: exynos: Drop a stray semicolon | expand |
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>
On Mon, 14 Oct 2019 11:18:58 +0900 Chanwoo Choi <cw00.choi@samsung.com> wrote: > 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> > Applied. Thanks, Jonathan
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);