summaryrefslogtreecommitdiffstats
path: root/drivers/pinctrl
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2013-05-17 11:42:13 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2013-05-21 09:35:11 +0200
commit4b77e455a5aa67920b2d4e0f1dbb53541a6e0338 (patch)
tree8b775d6243feaba557783ff28fbde340575bf443 /drivers/pinctrl
parent19bc427e44ba098b420a29de92cc010927793554 (diff)
downloadbarebox-4b77e455a5aa67920b2d4e0f1dbb53541a6e0338.tar.gz
pinctrl: imx-iomux-v3: only register pinctrl when device node is available
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@pengutronix.de>
Diffstat (limited to 'drivers/pinctrl')
-rw-r--r--drivers/pinctrl/imx-iomux-v3.c2
1 files changed, 1 insertions, 1 deletions
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;