diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-10-13 13:35:24 +0100 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-10-18 19:59:59 +0100 |
commit | 528e39b86fed3a52cdfa8c889da11cf093118b5a (patch) | |
tree | 3538396d32f6323df4593d422a9d5f90710867b3 /drivers/iio/adc | |
parent | 88e4787f0c42b1c2a197a48a7e2da88f72a7990a (diff) | |
download | linux-528e39b86fed3a52cdfa8c889da11cf093118b5a.tar.gz linux-528e39b86fed3a52cdfa8c889da11cf093118b5a.tar.bz2 linux-528e39b86fed3a52cdfa8c889da11cf093118b5a.zip |
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>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r-- | drivers/iio/adc/exynos_adc.c | 4 |
1 files changed, 1 insertions, 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); |