mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: barebox@lists.infradead.org
Subject: [PATCH 1/5] pinctrl: imx-iomux-v3: only register pinctrl when device node is available
Date: Tue, 21 May 2013 09:38:11 +0200	[thread overview]
Message-ID: <1369121895-11282-2-git-send-email-s.hauer@pengutronix.de> (raw)
In-Reply-To: <1369121895-11282-1-git-send-email-s.hauer@pengutronix.de>

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>
---
 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


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2013-05-21  7:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21  7:38 [PATCH] misc oftree patches Sascha Hauer
2013-05-21  7:38 ` Sascha Hauer [this message]
2013-06-05 15:18   ` [PATCH 1/5] pinctrl: imx-iomux-v3: only register pinctrl when device node is available Lucas Stach
2013-06-05 20:33     ` Sascha Hauer
2013-05-21  7:38 ` [PATCH 2/5] spi: improve devicetree support Sascha Hauer
2013-05-21  7:38 ` [PATCH 3/5] mtd: dataflash: Add devicetree probing support Sascha Hauer
2013-05-21  7:38 ` [PATCH 4/5] net: Add of_register_ethaddr Sascha Hauer
2013-05-21  7:38 ` [PATCH 5/5] net: fec: Add imx25 compatible property Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1369121895-11282-2-git-send-email-s.hauer@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox