[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1398938214-17847-14-git-send-email-lee.jones@linaro.org>
Date: Thu, 1 May 2014 10:56:20 +0100
From: Lee Jones <lee.jones@...aro.org>
To: linux-kernel@...r.kernel.org
Cc: computersforpeace@...il.com, linux-mtd@...ts.infradead.org,
kernel@...inux.com, Lee Jones <lee.jones@...aro.org>
Subject: [PATCH 13/47] mtd: nand: stm_nand_bch: scan for NAND devices
Use the core nand_scan_ident() routine to locate connected NAND chips.
Signed-off-by: Lee Jones <lee.jones@...aro.org>
---
drivers/mtd/nand/stm_nand_bch.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/drivers/mtd/nand/stm_nand_bch.c b/drivers/mtd/nand/stm_nand_bch.c
index 8a63c4a..2670cec 100644
--- a/drivers/mtd/nand/stm_nand_bch.c
+++ b/drivers/mtd/nand/stm_nand_bch.c
@@ -532,6 +532,7 @@ static int stm_nand_bch_probe(struct platform_device *pdev)
struct nandi_info *info;
struct nand_chip *chip;
struct mtd_info *mtd;
+ int err;
nandi = nandi_init_resources(pdev);
if (IS_ERR(nandi)) {
@@ -556,6 +557,10 @@ static int stm_nand_bch_probe(struct platform_device *pdev)
nandi_set_mtd_defaults(nandi, mtd, chip);
+ err = nand_scan_ident(mtd, 1, NULL);
+ if (err)
+ return err;
+
return 0;
}
@@ -563,6 +568,8 @@ static int stm_nand_bch_remove(struct platform_device *pdev)
{
struct nandi_controller *nandi = platform_get_drvdata(pdev);
+ nand_release(&nandi->info.mtd);
+
nandi_clk_disable(nandi);
return 0;
--
1.8.3.2
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists