mtd: fsmc_nand don't specify default parsing options

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Mon Nov 7 11:59:07 EST 2011


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=8d3f8bb8093080d4e2b1de096af444b694a16766
Commit:     8d3f8bb8093080d4e2b1de096af444b694a16766
Parent:     a8e083246387ffb9a84551fa908a358cacdc2b0c
Author:     Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
AuthorDate: Sun May 29 20:16:57 2011 +0400
Committer:  Artem Bityutskiy <artem.bityutskiy at intel.com>
CommitDate: Sun Sep 11 15:02:01 2011 +0300

    mtd: fsmc_nand don't specify default parsing options
    
    Since 'cmdline, NULL' is now a default for parse_mtd_partitions, don't specify
    this in every driver, instead pass NULL to force parse_mtd_partitions
    to use default.
    
    Signed-off-by: Dmitry Eremin-Solenikov <dbaryshkov at gmail.com>
    Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy at nokia.com>
---
 drivers/mtd/nand/fsmc_nand.c |   11 ++---------
 1 files changed, 2 insertions(+), 9 deletions(-)

diff --git a/drivers/mtd/nand/fsmc_nand.c b/drivers/mtd/nand/fsmc_nand.c
index 8a5f1aa..a39c224 100644
--- a/drivers/mtd/nand/fsmc_nand.c
+++ b/drivers/mtd/nand/fsmc_nand.c
@@ -177,9 +177,6 @@ static struct mtd_partition partition_info_128KB_blk[] = {
 	},
 };
 
-#ifdef CONFIG_MTD_CMDLINE_PARTS
-const char *part_probes[] = { "cmdlinepart", NULL };
-#endif
 
 /**
  * struct fsmc_nand_data - structure for FSMC NAND device state
@@ -716,15 +713,13 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 	 * platform data,
 	 * default partition information present in driver.
 	 */
-#ifdef CONFIG_MTD_CMDLINE_PARTS
 	/*
-	 * Check if partition info passed via command line
+	 * Check for partition info passed
 	 */
 	host->mtd.name = "nand";
-	host->nr_partitions = parse_mtd_partitions(&host->mtd, part_probes,
+	host->nr_partitions = parse_mtd_partitions(&host->mtd, NULL,
 			&host->partitions, 0);
 	if (host->nr_partitions <= 0) {
-#endif
 		/*
 		 * Check if partition info passed via command line
 		 */
@@ -769,9 +764,7 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
 				}
 			}
 		}
-#ifdef CONFIG_MTD_CMDLINE_PARTS
 	}
-#endif
 
 	ret = mtd_device_register(&host->mtd, host->partitions,
 				  host->nr_partitions);



More information about the linux-mtd-cvs mailing list