summaryrefslogtreecommitdiff
path: root/drivers/iio/adc
diff options
context:
space:
mode:
authorAishwarya Ramakrishnan <aishwaryarj100@gmail.com>2020-04-12 16:50:20 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2020-04-19 18:56:41 +0300
commit587122cb8b43421ce7b90a2a3f07eb0c498da2a6 (patch)
tree2dec87e5d04bcee64157e5593e209fda8d94c391 /drivers/iio/adc
parentaf5c2174ca6d9eb5d31a36fb057bbcf2aaac6f6c (diff)
downloadlinux-587122cb8b43421ce7b90a2a3f07eb0c498da2a6.tar.xz
iio: adc: fsl-imx25-gcq: Use devm_platform_ioremap_resource
Use the helper function that wraps the calls to platform_get_resource() and devm_ioremap_resource() together. It reduces boilerplate and suggested by coccinelle. Signed-off-by: Aishwarya Ramakrishnan <aishwaryarj100@gmail.com> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc')
-rw-r--r--drivers/iio/adc/fsl-imx25-gcq.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/adc/fsl-imx25-gcq.c b/drivers/iio/adc/fsl-imx25-gcq.c
index fa71489195c6..b0a4dc88ba9b 100644
--- a/drivers/iio/adc/fsl-imx25-gcq.c
+++ b/drivers/iio/adc/fsl-imx25-gcq.c
@@ -294,7 +294,6 @@ static int mx25_gcq_probe(struct platform_device *pdev)
struct mx25_gcq_priv *priv;
struct mx25_tsadc *tsadc = dev_get_drvdata(pdev->dev.parent);
struct device *dev = &pdev->dev;
- struct resource *res;
void __iomem *mem;
int ret;
int i;
@@ -305,8 +304,7 @@ static int mx25_gcq_probe(struct platform_device *pdev)
priv = iio_priv(indio_dev);
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- mem = devm_ioremap_resource(dev, res);
+ mem = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(mem))
return PTR_ERR(mem);