[PATCH] mtd/nand: Don't add disabled nand flash devices
Chunhe Lan
Chunhe.Lan at freescale.com
Tue Aug 16 19:27:35 EST 2011
Nand flash nodes with the property status="disabled" are not
usable and so avoid adding "disabled" nand flash devices with
the system.
Signed-off-by: Chunhe Lan <Chunhe.Lan at freescale.com>
---
drivers/mtd/nand/fsl_elbc_nand.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/drivers/mtd/nand/fsl_elbc_nand.c b/drivers/mtd/nand/fsl_elbc_nand.c
index 33d8aad..8212c12 100644
--- a/drivers/mtd/nand/fsl_elbc_nand.c
+++ b/drivers/mtd/nand/fsl_elbc_nand.c
@@ -1,6 +1,6 @@
/* Freescale Enhanced Local Bus Controller NAND driver
*
- * Copyright © 2006-2007, 2010 Freescale Semiconductor
+ * Copyright © 2006-2007, 2010-2011 Freescale Semiconductor
*
* Authors: Nick Spence <nick.spence at freescale.com>,
* Scott Wood <scottwood at freescale.com>
@@ -849,6 +849,9 @@ static int __devinit fsl_elbc_nand_probe(struct platform_device *pdev)
struct device *dev;
struct device_node *node = pdev->dev.of_node;
+ if (!of_device_is_available(node))
+ return -ENODEV;
+
if (!fsl_lbc_ctrl_dev || !fsl_lbc_ctrl_dev->regs)
return -ENODEV;
lbc = fsl_lbc_ctrl_dev->regs;
--
1.5.6.5
More information about the Linuxppc-dev
mailing list