[PATCH 1/5] pinctrl: imx-iomux-v3: only register pinctrl when device node is available

Sascha Hauer s.hauer at pengutronix.de
Tue May 21 03:38:11 EDT 2013


The pinctrl support is devicetree only, so only register it
when we actually have a devicetree. Otherwise we crash boards
using the iomux-v3 from platform code in pinctrl_register().

Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/pinctrl/imx-iomux-v3.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pinctrl/imx-iomux-v3.c b/drivers/pinctrl/imx-iomux-v3.c
index 3ff3c15..c867a23 100644
--- a/drivers/pinctrl/imx-iomux-v3.c
+++ b/drivers/pinctrl/imx-iomux-v3.c
@@ -177,7 +177,7 @@ static int imx_iomux_v3_probe(struct device_d *dev)
 	iomuxv3_base = dev_request_mem_region(dev, 0);
 	iomuxv3_dev = dev;
 
-	if (IS_ENABLED(CONFIG_PINCTRL))
+	if (IS_ENABLED(CONFIG_PINCTRL) && dev->device_node)
 		ret = imx_pinctrl_dt(dev, iomuxv3_base);
 
 	return ret;
-- 
1.8.2.rc2




More information about the barebox mailing list