public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
From: stigge@antcom.de (Roland Stigge)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 4/4] mtd: lpc32xx_slc: Make probe() return -EPROBE_DEFER if necessary
Date: Wed, 27 Jun 2012 17:51:15 +0200	[thread overview]
Message-ID: <1340812275-1197-4-git-send-email-stigge@antcom.de> (raw)
In-Reply-To: <1340812275-1197-1-git-send-email-stigge@antcom.de>

Via of_get_named_gpio(), wp_gpio can become -EPROBE_DEFER which now makes
probe() return -EPROBE_DEFER as well to wait until the gpio controller is
probed before trying to probe lpc32xx_slc again.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr@gmail.com>
---
 drivers/mtd/nand/lpc32xx_slc.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c
index 4e8db3a..142a91d 100644
--- a/drivers/mtd/nand/lpc32xx_slc.c
+++ b/drivers/mtd/nand/lpc32xx_slc.c
@@ -821,6 +821,8 @@ static int __devinit lpc32xx_nand_probe(struct platform_device *pdev)
 		dev_err(&pdev->dev, "Missing platform data\n");
 		return -ENOENT;
 	}
+	if (host->ncfg->wp_gpio == -EPROBE_DEFER)
+		return -EPROBE_DEFER;
 	if (gpio_is_valid(host->ncfg->wp_gpio) &&
 			gpio_request(host->ncfg->wp_gpio, "NAND WP")) {
 		dev_err(&pdev->dev, "GPIO not available\n");
-- 
1.7.10.4

  parent reply	other threads:[~2012-06-27 15:51 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-27 15:51 [PATCH 1/4] mtd: lpc32xx_slc: Select AMBA_PL08X in Kconfig Roland Stigge
2012-06-27 15:51 ` [PATCH 2/4] mtd: lpc32xx_slc: Make wp gpio optional Roland Stigge
2012-06-29 10:37   ` Artem Bityutskiy
2012-06-27 15:51 ` [PATCH 3/4] mtd: lpc32xx_slc: Use of_get_named_gpio() Roland Stigge
2012-06-27 15:51 ` Roland Stigge [this message]
2012-06-27 19:15 ` [PATCH 1/4] mtd: lpc32xx_slc: Select AMBA_PL08X in Kconfig Russell King - ARM Linux
2012-06-27 19:26   ` Alexandre Pereira da Silva
2012-06-27 19:30     ` Russell King - ARM Linux
2012-06-27 19:49       ` Alexandre Pereira da Silva

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=1340812275-1197-4-git-send-email-stigge@antcom.de \
    --to=stigge@antcom.de \
    --cc=linux-arm-kernel@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