[PATCH] plat_nand: set mtd->name

Hamish Moffatt hamish at cloud.net.au
Fri Mar 28 00:00:00 EDT 2008


This patch sets mtd->name to the platform bus ID in the plat_nand
driver, so that you can specify partitions readily with mtdparts=.

Currently it relies on nand_base filling in the name from the device,
which results in names like "NAND 256MiB 3,3V 8-bit", that you can't
use with cmdlineparts.

Signed-off-by: Hamish Moffatt <hamish at cloud.net.au>
--
BTW, most of the NAND drivers appear to use a fixed name, which makes it 
hard to use them with mtdparts= if you had multiple devices.

--- drivers/mtd/nand/plat_nand.c	(revision 4106)
+++ drivers/mtd/nand/plat_nand.c	(working copy)
@@ -54,6 +54,7 @@
 	data->chip.priv = &data;
 	data->mtd.priv = &data->chip;
 	data->mtd.owner = THIS_MODULE;
+	data->mtd.name = pdev->dev.bus_id;
 
 	data->chip.IO_ADDR_R = data->io_base;
 	data->chip.IO_ADDR_W = data->io_base;

-- 
Hamish Moffatt VK3SB <hamish at debian.org> <hamish at cloud.net.au>



More information about the linux-mtd mailing list