diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2019-03-11 19:54:46 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-04-05 00:04:26 +0700 |
commit | 09ec4735921498e9f3e368e079367225d74ab8a6 (patch) | |
tree | ef006f73190c4d1dbc6c7cc7bba5ab98cae97ea3 /drivers/gpio/gpio-clps711x.c | |
parent | b2c09588f242b1414f4c7535f2bc390e66794743 (diff) | |
download | linux-stable-09ec4735921498e9f3e368e079367225d74ab8a6.tar.gz linux-stable-09ec4735921498e9f3e368e079367225d74ab8a6.tar.bz2 linux-stable-09ec4735921498e9f3e368e079367225d74ab8a6.zip |
drivers: gpio: clps711x: use devm_platform_ioremap_resource()
Use the new helper that wraps the calls to platform_get_resource()
and devm_ioremap_resource() together.
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-clps711x.c')
-rw-r--r-- | drivers/gpio/gpio-clps711x.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/gpio/gpio-clps711x.c b/drivers/gpio/gpio-clps711x.c index 52fd63f02134..0fbbb0edc0ba 100644 --- a/drivers/gpio/gpio-clps711x.c +++ b/drivers/gpio/gpio-clps711x.c @@ -19,7 +19,6 @@ static int clps711x_gpio_probe(struct platform_device *pdev) struct device_node *np = pdev->dev.of_node; void __iomem *dat, *dir; struct gpio_chip *gc; - struct resource *res; int err, id; if (!np) @@ -33,13 +32,11 @@ static int clps711x_gpio_probe(struct platform_device *pdev) if (!gc) return -ENOMEM; - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - dat = devm_ioremap_resource(&pdev->dev, res); + dat = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(dat)) return PTR_ERR(dat); - res = platform_get_resource(pdev, IORESOURCE_MEM, 1); - dir = devm_ioremap_resource(&pdev->dev, res); + dir = devm_platform_ioremap_resource(pdev, 1); if (IS_ERR(dir)) return PTR_ERR(dir); |