aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/nand/sharpsl.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/nand/sharpsl.c')
-rw-r--r--drivers/mtd/nand/sharpsl.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/mtd/nand/sharpsl.c b/drivers/mtd/nand/sharpsl.c
index 19e24ed089ea..619d2a504788 100644
--- a/drivers/mtd/nand/sharpsl.c
+++ b/drivers/mtd/nand/sharpsl.c
@@ -103,16 +103,12 @@ static int sharpsl_nand_calculate_ecc(struct mtd_info *mtd, const u_char * dat,
103 return readb(sharpsl->io + ECCCNTR) != 0; 103 return readb(sharpsl->io + ECCCNTR) != 0;
104} 104}
105 105
106static const char *part_probes[] = { "cmdlinepart", NULL };
107
108/* 106/*
109 * Main initialization routine 107 * Main initialization routine
110 */ 108 */
111static int __devinit sharpsl_nand_probe(struct platform_device *pdev) 109static int __devinit sharpsl_nand_probe(struct platform_device *pdev)
112{ 110{
113 struct nand_chip *this; 111 struct nand_chip *this;
114 struct mtd_partition *sharpsl_partition_info;
115 int nr_partitions;
116 struct resource *r; 112 struct resource *r;
117 int err = 0; 113 int err = 0;
118 struct sharpsl_nand *sharpsl; 114 struct sharpsl_nand *sharpsl;
@@ -184,14 +180,9 @@ static int __devinit sharpsl_nand_probe(struct platform_device *pdev)
184 180
185 /* Register the partitions */ 181 /* Register the partitions */
186 sharpsl->mtd.name = "sharpsl-nand"; 182 sharpsl->mtd.name = "sharpsl-nand";
187 nr_partitions = parse_mtd_partitions(&sharpsl->mtd, part_probes, &sharpsl_partition_info, 0);
188 if (nr_partitions <= 0) {
189 nr_partitions = data->nr_partitions;
190 sharpsl_partition_info = data->partitions;
191 }
192 183
193 err = mtd_device_register(&sharpsl->mtd, sharpsl_partition_info, 184 err = mtd_device_parse_register(&sharpsl->mtd, NULL, 0,
194 nr_partitions); 185 data->partitions, data->nr_partitions);
195 if (err) 186 if (err)
196 goto err_add; 187 goto err_add;
197 188