Thread (6 messages) 6 messages, 5 authors, 2014-11-27

[PATCH/RFC] gpio: em: Use dynamic allocation of GPIOs

From: Geert Uytterhoeven <geert+renesas@glider.be>
Date: 2014-11-17 14:30:32
Also in: linux-gpio, linux-sh
Subsystem: gpio subsystem, the rest · Maintainers: Linus Walleij, Bartosz Golaszewski, Linus Torvalds

Use dynamic allocation of GPIOs instead of looking at the gpio%u alias
in DT.
---
  - Is this correct? Not having to care about the alias would simplify the
    to-be-written DT binding documentation.
  - Completely untested.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

 drivers/gpio/gpio-em.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/drivers/gpio/gpio-em.c b/drivers/gpio/gpio-em.c
index 21d34d4d473dcefe..c3434146f605748b 100644
--- a/drivers/gpio/gpio-em.c
+++ b/drivers/gpio/gpio-em.c
@@ -330,12 +330,7 @@ static int em_gio_probe(struct platform_device *pdev)
 			goto err0;
 		}
 
-		ret = of_alias_get_id(pdev->dev.of_node, "gpio");
-		if (ret < 0) {
-			dev_err(&pdev->dev, "Couldn't get OF id\n");
-			goto err0;
-		}
-		pdata->gpio_base = ret * 32; /* 32 GPIOs per instance */
+		pdata->gpio_base = -1;
 	}
 
 	gpio_chip = &p->gpio_chip;
-- 
1.9.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help