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:
parent
88e4787f0c
commit
528e39b86f
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue