Linux Kernels

drivers: gpio: timberdale: use devm_platform_ioremap_resource()

This change “drivers: gpio: timberdale: use devm_platform_ioremap_resource()” (commit aa6c9b9) in Linux kernel is authored by Enrico Weigelt, metux IT consult <info [at] metux.net> on Mon Mar 11 19:55:13 2019 +0100.

Description of "drivers: gpio: timberdale: use devm_platform_ioremap_resource()"

The change “drivers: gpio: timberdale: use devm_platform_ioremap_resource()” introduces changes as follows.

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 <info@metux.net>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

Linux kernel releases containing commit aa6c9b9

The Linux kernel releases containing this commit are as follows.

Linux kernel code changes in "drivers: gpio: timberdale: use devm_platform_ioremap_resource()"

There are 4 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/gpio/gpio-timberdale.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
 
diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c
index 314e300d6ba3..1c70e831069c 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);
 

The commit for this change in Linux stable tree is aa6c9b9 (patch).

Last modified: 2020/01/11 06:40