[MTD] [NAND] plat_nand: set mtd->name

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Apr 22 16:59:01 EDT 2008


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=93919d384df98eba02bebd417ecb2f481b3bdcb8
Commit:     93919d384df98eba02bebd417ecb2f481b3bdcb8
Parent:     1938de46cb7e108120ffbf5155678a2a5e05b377
Author:     Hamish Moffatt <hamish at cloud.net.au>
AuthorDate: Fri Mar 28 15:00:00 2008 +1100
Committer:  David Woodhouse <dwmw2 at infradead.org>
CommitDate: Tue Apr 22 21:11:54 2008 +0100

    [MTD] [NAND] plat_nand: set mtd->name
    
    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>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 drivers/mtd/nand/plat_nand.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/plat_nand.c b/drivers/mtd/nand/plat_nand.c
index 0fdb93e..f674c54 100644
--- a/drivers/mtd/nand/plat_nand.c
+++ b/drivers/mtd/nand/plat_nand.c
@@ -54,6 +54,7 @@ static int __init plat_nand_probe(struct platform_device *pdev)
 	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;



More information about the linux-mtd-cvs mailing list