From: Enrico Weigelt, metux IT consult Date: Mon, 11 Mar 2019 18:55:13 +0000 (+0100) Subject: drivers: gpio: timberdale: use devm_platform_ioremap_resource() X-Git-Tag: v5.4-rc1~1012^2~34 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=aa6c9b91089b40d7efa411cec3de537f324debd8;p=platform%2Fkernel%2Flinux-rpi.git drivers: gpio: timberdale: 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 Signed-off-by: Linus Walleij --- diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c index 314e300..1c70e83 100644 --- a/drivers/gpio/gpio-timberdale.c +++ b/drivers/gpio/gpio-timberdale.c @@ -229,7 +229,6 @@ static int timbgpio_probe(struct platform_device *pdev) struct device *dev = &pdev->dev; struct gpio_chip *gc; struct timbgpio *tgpio; - struct resource *iomem; struct timbgpio_platform_data *pdata = dev_get_platdata(&pdev->dev); int irq = platform_get_irq(pdev, 0); @@ -246,8 +245,7 @@ static int timbgpio_probe(struct platform_device *pdev) spin_lock_init(&tgpio->lock); - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); - tgpio->membase = devm_ioremap_resource(dev, iomem); + tgpio->membase = devm_platform_ioremap_resource(pdev, 0); if (IS_ERR(tgpio->membase)) return PTR_ERR(tgpio->membase);