[MTD] [NAND] add cmdline parsing (mtdparts=) support to cafe_nand
Linux-MTD Mailing List
linux-mtd at lists.infradead.org
Fri Jan 9 09:59:01 EST 2009
Gitweb: http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=68874414def891ec1319ae19a1c7e9c00854d872
Commit: 68874414def891ec1319ae19a1c7e9c00854d872
Parent: fefae48bf8caab7d56ee4f8181f06602cf73d29e
Author: Philip Rakity <prakity at yahoo.com>
AuthorDate: Wed Oct 8 16:08:20 2008 -0700
Committer: David Woodhouse <David.Woodhouse at intel.com>
CommitDate: Fri Jan 9 12:27:13 2009 +0000
[MTD] [NAND] add cmdline parsing (mtdparts=) support to cafe_nand
[dwmw2: updated and made to still register whole device first]
Signed-off-by: Philip Rakity <pakity at yahoo.com>
Signed-off-by: David Woodhouse <David.Woodhouse at intel.com>
---
drivers/mtd/nand/cafe_nand.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
index b8064bf..22a6b2e 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/cafe_nand.c
@@ -90,7 +90,7 @@ static int timing[3];
module_param_array(timing, int, &numtimings, 0644);
#ifdef CONFIG_MTD_PARTITIONS
-static const char *part_probes[] = { "RedBoot", NULL };
+static const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL };
#endif
/* Hrm. Why isn't this already conditional on something in the struct device? */
@@ -805,10 +805,13 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
add_mtd_device(mtd);
#ifdef CONFIG_MTD_PARTITIONS
+#ifdef CONFIG_MTD_CMDLINE_PARTS
+ mtd->name = "cafe_nand";
+#endif
nr_parts = parse_mtd_partitions(mtd, part_probes, &parts, 0);
if (nr_parts > 0) {
cafe->parts = parts;
- dev_info(&cafe->pdev->dev, "%d RedBoot partitions found\n", nr_parts);
+ dev_info(&cafe->pdev->dev, "%d partitions found\n", nr_parts);
add_mtd_partitions(mtd, parts, nr_parts);
}
#endif
More information about the linux-mtd-cvs
mailing list