diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2019-06-17 18:49:18 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-06-27 15:56:51 +0100 |
commit | 01d078aa9b90c17e4632a8244705d53c23e505bd (patch) | |
tree | b5d100a0be6becdd50e45d2a87c5ea0cc1dd9376 /drivers/gpio/gpio-grgpio.c | |
parent | 6bdec6c77d62f11545b5487b4649f167c98ab556 (diff) | |
download | lwn-01d078aa9b90c17e4632a8244705d53c23e505bd.tar.gz lwn-01d078aa9b90c17e4632a8244705d53c23e505bd.zip |
gpio: grgpio: 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-grgpio.c')
-rw-r--r-- | drivers/gpio/gpio-grgpio.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-grgpio.c b/drivers/gpio/gpio-grgpio.c index 45b8d6a02b87..8f8069e4e2f9 100644 --- a/drivers/gpio/gpio-grgpio.c +++ b/drivers/gpio/gpio-grgpio.c @@ -333,7 +333,6 @@ static int grgpio_probe(struct platform_device *ofdev) void __iomem *regs; struct gpio_chip *gc; struct grgpio_priv *priv; - struct resource *res; int err; u32 prop; s32 *irqmap; @@ -344,8 +343,7 @@ static int grgpio_probe(struct platform_device *ofdev) if (!priv) return -ENOMEM; - res = platform_get_resource(ofdev, IORESOURCE_MEM, 0); - regs = devm_ioremap_resource(&ofdev->dev, res); + regs = devm_platform_ioremap_resource(ofdev, 0); if (IS_ERR(regs)) return PTR_ERR(regs); |