iio: adc: exynos: use devm_platform_ioremap_resource

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>
Reviewed-by: Chanwoo Choi <cw00.choi@samsung.com>
This commit is contained in:
Jonathan Cameron 2019-10-13 13:35:24 +01:00
parent 88e4787f0c
commit 528e39b86f
1 changed files with 1 additions and 3 deletions

View File

@ -769,7 +769,6 @@ static int exynos_adc_probe(struct platform_device *pdev)
struct device_node *np = pdev->dev.of_node; struct device_node *np = pdev->dev.of_node;
struct s3c2410_ts_mach_info *pdata = dev_get_platdata(&pdev->dev); struct s3c2410_ts_mach_info *pdata = dev_get_platdata(&pdev->dev);
struct iio_dev *indio_dev = NULL; struct iio_dev *indio_dev = NULL;
struct resource *mem;
bool has_ts = false; bool has_ts = false;
int ret = -ENODEV; int ret = -ENODEV;
int irq; int irq;
@ -788,8 +787,7 @@ static int exynos_adc_probe(struct platform_device *pdev)
return -EINVAL; return -EINVAL;
} }
mem = platform_get_resource(pdev, IORESOURCE_MEM, 0); info->regs = devm_platform_ioremap_resource(pdev, 0);
info->regs = devm_ioremap_resource(&pdev->dev, mem);
if (IS_ERR(info->regs)) if (IS_ERR(info->regs))
return PTR_ERR(info->regs); return PTR_ERR(info->regs);