diff options
Diffstat (limited to 'drivers/mtd/nand/jz4740_nand.c')
-rw-r--r-- | drivers/mtd/nand/jz4740_nand.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/mtd/nand/jz4740_nand.c b/drivers/mtd/nand/jz4740_nand.c index 6e813daed068..e2664073a89b 100644 --- a/drivers/mtd/nand/jz4740_nand.c +++ b/drivers/mtd/nand/jz4740_nand.c | |||
@@ -251,10 +251,6 @@ static int jz_nand_correct_ecc_rs(struct mtd_info *mtd, uint8_t *dat, | |||
251 | return 0; | 251 | return 0; |
252 | } | 252 | } |
253 | 253 | ||
254 | #ifdef CONFIG_MTD_CMDLINE_PARTS | ||
255 | static const char *part_probes[] = {"cmdline", NULL}; | ||
256 | #endif | ||
257 | |||
258 | static int jz_nand_ioremap_resource(struct platform_device *pdev, | 254 | static int jz_nand_ioremap_resource(struct platform_device *pdev, |
259 | const char *name, struct resource **res, void __iomem **base) | 255 | const char *name, struct resource **res, void __iomem **base) |
260 | { | 256 | { |
@@ -299,8 +295,6 @@ static int __devinit jz_nand_probe(struct platform_device *pdev) | |||
299 | struct nand_chip *chip; | 295 | struct nand_chip *chip; |
300 | struct mtd_info *mtd; | 296 | struct mtd_info *mtd; |
301 | struct jz_nand_platform_data *pdata = pdev->dev.platform_data; | 297 | struct jz_nand_platform_data *pdata = pdev->dev.platform_data; |
302 | struct mtd_partition *partition_info; | ||
303 | int num_partitions = 0; | ||
304 | 298 | ||
305 | nand = kzalloc(sizeof(*nand), GFP_KERNEL); | 299 | nand = kzalloc(sizeof(*nand), GFP_KERNEL); |
306 | if (!nand) { | 300 | if (!nand) { |
@@ -373,15 +367,9 @@ static int __devinit jz_nand_probe(struct platform_device *pdev) | |||
373 | goto err_gpio_free; | 367 | goto err_gpio_free; |
374 | } | 368 | } |
375 | 369 | ||
376 | #ifdef CONFIG_MTD_CMDLINE_PARTS | 370 | ret = mtd_device_parse_register(mtd, NULL, 0, |
377 | num_partitions = parse_mtd_partitions(mtd, part_probes, | 371 | pdata ? pdata->partitions : NULL, |
378 | &partition_info, 0); | 372 | pdata ? pdata->num_partitions : 0); |
379 | #endif | ||
380 | if (num_partitions <= 0 && pdata) { | ||
381 | num_partitions = pdata->num_partitions; | ||
382 | partition_info = pdata->partitions; | ||
383 | } | ||
384 | ret = mtd_device_register(mtd, partition_info, num_partitions); | ||
385 | 373 | ||
386 | if (ret) { | 374 | if (ret) { |
387 | dev_err(&pdev->dev, "Failed to add mtd device\n"); | 375 | dev_err(&pdev->dev, "Failed to add mtd device\n"); |