diff options
author | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-10-13 18:37:59 +0300 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2019-10-18 22:01:34 +0300 |
commit | 5f401ef09291e574b2cc5b6453369130e39d136b (patch) | |
tree | 218157a9b090abadba87eaa321876b4ea851693e /drivers/iio/adc/meson_saradc.c | |
parent | 528e39b86fed3a52cdfa8c889da11cf093118b5a (diff) | |
download | linux-5f401ef09291e574b2cc5b6453369130e39d136b.tar.xz |
iio: adc: meson_saradc: use devm_platform_ioremap_resource
Avoid local boilerplate.
Suggested by coccinelle via coccicheck.
CHECK drivers/iio/adc/meson_saradc.c
drivers/iio/adc/meson_saradc.c:1218:1-5: WARNING: Use devm_platform_ioremap_resource for base
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/adc/meson_saradc.c')
-rw-r--r-- | drivers/iio/adc/meson_saradc.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iio/adc/meson_saradc.c b/drivers/iio/adc/meson_saradc.c index 7b27306330a3..22a470db9ef8 100644 --- a/drivers/iio/adc/meson_saradc.c +++ b/drivers/iio/adc/meson_saradc.c @@ -1187,7 +1187,6 @@ static int meson_sar_adc_probe(struct platform_device *pdev) const struct meson_sar_adc_data *match_data; struct meson_sar_adc_priv *priv; struct iio_dev *indio_dev; - struct resource *res; void __iomem *base; int irq, ret; @@ -1214,8 +1213,7 @@ static int meson_sar_adc_probe(struct platform_device *pdev) indio_dev->modes = INDIO_DIRECT_MODE; indio_dev->info = &meson_sar_adc_iio_info; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - base = devm_ioremap_resource(&pdev->dev, res); + base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(base)) return PTR_ERR(base); |