diff mbox series

[23/42] drivers: gpio: use devm_platform_ioremap_resource()

Message ID 1552330521-4276-23-git-send-email-info@metux.net (mailing list archive)
State Not Applicable
Headers show
Series [01/42] drivers: gpio: 74xx-mmio: use devm_platform_ioremap_resource() | expand

Commit Message

Enrico Weigelt, metux IT consult March 11, 2019, 6:55 p.m. UTC
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>
---
 drivers/gpio/gpio-octeon.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Florian Fainelli March 11, 2019, 7:01 p.m. UTC | #1
On 3/11/19 11:55 AM, Enrico Weigelt, metux IT consult wrote:
> 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>

The subject is missing an "octeon: " part here to indicate which driver
this applies to.

Maybe you should convert all drivers in one go though?
diff mbox series

Patch

diff --git a/drivers/gpio/gpio-octeon.c b/drivers/gpio/gpio-octeon.c
index 1b19c88..afb0e8a 100644
--- a/drivers/gpio/gpio-octeon.c
+++ b/drivers/gpio/gpio-octeon.c
@@ -82,7 +82,6 @@  static int octeon_gpio_probe(struct platform_device *pdev)
 {
 	struct octeon_gpio *gpio;
 	struct gpio_chip *chip;
-	struct resource *res_mem;
 	void __iomem *reg_base;
 	int err = 0;
 
@@ -91,8 +90,7 @@  static int octeon_gpio_probe(struct platform_device *pdev)
 		return -ENOMEM;
 	chip = &gpio->chip;
 
-	res_mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	reg_base = devm_ioremap_resource(&pdev->dev, res_mem);
+	reg_base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(reg_base))
 		return PTR_ERR(reg_base);