diff options
author | Enrico Weigelt, metux IT consult <info@metux.net> | 2019-03-11 19:55:08 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2019-04-04 19:04:26 +0200 |
commit | 94a2d4279924ca65df513cb5dbac803607f7279d (patch) | |
tree | 7195571c35aba00f4be7fd3ca95bea2af04fdb63 /drivers/gpio/gpio-sprd.c | |
parent | drivers: gpio: dwap: use devm_platform_ioremap_resource() (diff) | |
download | linux-94a2d4279924ca65df513cb5dbac803607f7279d.tar.xz linux-94a2d4279924ca65df513cb5dbac803607f7279d.zip |
drivers: gpio: sprd: 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>
Reviewed-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-sprd.c')
-rw-r--r-- | drivers/gpio/gpio-sprd.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-sprd.c b/drivers/gpio/gpio-sprd.c index 55072d2b367f..f5c8b3a351d5 100644 --- a/drivers/gpio/gpio-sprd.c +++ b/drivers/gpio/gpio-sprd.c @@ -219,7 +219,6 @@ static int sprd_gpio_probe(struct platform_device *pdev) { struct gpio_irq_chip *irq; struct sprd_gpio *sprd_gpio; - struct resource *res; int ret; sprd_gpio = devm_kzalloc(&pdev->dev, sizeof(*sprd_gpio), GFP_KERNEL); @@ -232,8 +231,7 @@ static int sprd_gpio_probe(struct platform_device *pdev) return sprd_gpio->irq; } - res = platform_get_resource(pdev, IORESOURCE_MEM, 0); - sprd_gpio->base = devm_ioremap_resource(&pdev->dev, res); + sprd_gpio->base = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(sprd_gpio->base)) return PTR_ERR(sprd_gpio->base); |