mtd: lpc32xx_slc: Make probe() return -EPROBE_DEFER if necessary
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Jul 6 13:59:08 EDT 2012
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=d5842ab730d368ae2e8925dc00aec0ca132b72ab
Commit: d5842ab730d368ae2e8925dc00aec0ca132b72ab
Parent: 21535ab39a74b5ec074e2d10b132e866472e86f9
Author: Roland Stigge <stigge at antcom.de>
AuthorDate: Wed Jun 27 17:51:15 2012 +0200
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Jul 6 18:25:25 2012 +0100
mtd: lpc32xx_slc: Make probe() return -EPROBE_DEFER if necessary
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 at antcom.de>
Acked-by: Alexandre Pereira da Silva <aletes.xgr at gmail.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy at linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/lpc32xx_slc.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/mtd/nand/lpc32xx_slc.c b/drivers/mtd/nand/lpc32xx_slc.c
index 1166650..1719387 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");
More information about the linux-mtd-cvs
mailing list