summaryrefslogtreecommitdiffstats
path: root/drivers/iio
diff options
context:
space:
mode:
authorJonathan Cameron <Jonathan.Cameron@huawei.com>2019-10-13 17:43:49 +0100
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2019-11-09 12:28:21 +0000
commitafac22e3cf9598df1ab02973f0ea70de098250da (patch)
treee7ccdbe2b3c47df5a406e40a86f7825e9faeadc5 /drivers/iio
parente8ad78658ecc97c7f5b6d70fc5266bc19c3bbf29 (diff)
downloadlinux-afac22e3cf9598df1ab02973f0ea70de098250da.tar.gz
linux-afac22e3cf9598df1ab02973f0ea70de098250da.tar.bz2
linux-afac22e3cf9598df1ab02973f0ea70de098250da.zip
iio: adc: vf610: use devm_platform_ioremap_resource
Reduces boilerplate. Suggested by coccinelle CHECK drivers/iio/adc/vf610_adc.c drivers/iio/adc/vf610_adc.c:819:1-11: WARNING: Use devm_platform_ioremap_resource for info -> regs Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> Cc: Fugang Duan <b38611@freescale.com>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/adc/vf610_adc.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/adc/vf610_adc.c b/drivers/iio/adc/vf610_adc.c
index 98b30475bbc6..cb7380bf07ca 100644
--- a/drivers/iio/adc/vf610_adc.c
+++ b/drivers/iio/adc/vf610_adc.c
@@ -802,7 +802,6 @@ static int vf610_adc_probe(struct platform_device *pdev)
{
struct vf610_adc *info;
struct iio_dev *indio_dev;
- struct resource *mem;
int irq;
int ret;
@@ -815,8 +814,7 @@ static int vf610_adc_probe(struct platform_device *pdev)
info = iio_priv(indio_dev);
info->dev = &pdev->dev;
- 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);