[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1432565608-26036-19-git-send-email-tomeu.vizoso@collabora.com>
Date: Mon, 25 May 2015 16:53:22 +0200
From: Tomeu Vizoso <tomeu.vizoso@...labora.com>
To: linux-arm-kernel@...ts.infradead.org
Cc: Stéphane Marchesin
<stephane.marchesin@...il.com>,
Thierry Reding <thierry.reding@...il.com>,
Dmitry Torokhov <dmitry.torokhov@...il.com>,
Alexander Holler <holler@...oftware.de>,
Grant Likely <grant.likely@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Tomeu Vizoso <tomeu.vizoso@...labora.com>,
Linus Walleij <linus.walleij@...aro.org>,
linux-gpio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 18/21] pinctrl: Probe pinctrl devices on demand
When looking up a pin controller through its DT node, ensure that the
corresponding device has been registered.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@...labora.com>
---
drivers/pinctrl/devicetree.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/pinctrl/devicetree.c b/drivers/pinctrl/devicetree.c
index 0bbf7d7..17231ea 100644
--- a/drivers/pinctrl/devicetree.c
+++ b/drivers/pinctrl/devicetree.c
@@ -18,6 +18,7 @@
#include <linux/device.h>
#include <linux/of.h>
+#include <linux/of_platform.h>
#include <linux/pinctrl/pinctrl.h>
#include <linux/slab.h>
@@ -118,6 +119,7 @@ static int dt_to_map_one_config(struct pinctrl *p, const char *statename,
/* Find the pin controller containing np_config */
np_pctldev = of_node_get(np_config);
+ of_platform_device_ensure(np_pctldev);
for (;;) {
np_pctldev = of_get_next_parent(np_pctldev);
if (!np_pctldev || of_node_is_root(np_pctldev)) {
--
2.4.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists