Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=693ef66d8914f50cb899b5268676ea508d1f3178
Commit:     693ef66d8914f50cb899b5268676ea508d1f3178
Parent:     1a12f46af1af1a4b7b9c7ae7ab2c8ded3481a4ba
Author:     Andrew Victor <[EMAIL PROTECTED]>
AuthorDate: Thu May 3 08:16:44 2007 +0200
Committer:  David Woodhouse <[EMAIL PROTECTED]>
CommitDate: Thu May 3 07:40:41 2007 +0100

    [MTD] [NAND] at91_nand.c: CMDLINE_PARTS support
    
    This patch allows you to specify at91_nand partitions on the
    kernel command line using the mtdparts variable, if
    CONFIG_MTD_CMDLINE_PARTS is set.
    
    Signed-off-by: Frank Mandarino <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Victor <[EMAIL PROTECTED]>
    Signed-off-by: David Woodhouse <[EMAIL PROTECTED]>
---
 drivers/mtd/nand/at91_nand.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/drivers/mtd/nand/at91_nand.c b/drivers/mtd/nand/at91_nand.c
index 14b80cc..512e999 100644
--- a/drivers/mtd/nand/at91_nand.c
+++ b/drivers/mtd/nand/at91_nand.c
@@ -82,6 +82,10 @@ static void at91_nand_disable(struct at91_nand_host *host)
                at91_set_gpio_value(host->board->enable_pin, 1);
 }
 
+#ifdef CONFIG_MTD_PARTITIONS
+const char *part_probes[] = { "cmdlinepart", NULL };
+#endif
+
 /*
  * Probe for the NAND device.
  */
@@ -151,6 +155,12 @@ static int __init at91_nand_probe(struct platform_device 
*pdev)
 #ifdef CONFIG_MTD_PARTITIONS
        if (host->board->partition_info)
                partitions = host->board->partition_info(mtd->size, 
&num_partitions);
+#ifdef CONFIG_MTD_CMDLINE_PARTS
+       else {
+               mtd->name = "at91_nand";
+               num_partitions = parse_mtd_partitions(mtd, part_probes, 
&partitions, 0);
+       }
+#endif
 
        if ((!partitions) || (num_partitions == 0)) {
                printk(KERN_ERR "at91_nand: No parititions defined, or 
unsupported device.\n");
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to