mtd: do not use plain 0 as NULL
authorArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Fri, 9 Mar 2012 17:24:26 +0000 (19:24 +0200)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Mon, 26 Mar 2012 23:53:20 +0000 (00:53 +0100)
The first 3 arguments of 'mtd_device_parse_register()' are pointers,
but many callers pass '0' instead of 'NULL'. Fix this globally. Thanks
to coccinelle for making it easy to do with the following semantic patch:

 @@
 expression mtd, types, parser_data, parts, nr_parts;
 @@
 (
 -mtd_device_parse_register(mtd, 0, parser_data, parts, nr_parts)
 +mtd_device_parse_register(mtd, NULL, parser_data, parts, nr_parts)
 |
 -mtd_device_parse_register(mtd, types, 0, parts, nr_parts)
 +mtd_device_parse_register(mtd, types, NULL, parts, nr_parts)
 |
 -mtd_device_parse_register(mtd, types, parser_data, 0, nr_parts)
 +mtd_device_parse_register(mtd, types, parser_data, NULL, nr_parts)
 )

Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
41 files changed:
arch/mips/cavium-octeon/flash_setup.c
drivers/mtd/devices/spear_smi.c
drivers/mtd/devices/sst25l.c
drivers/mtd/maps/bfin-async-flash.c
drivers/mtd/maps/dc21285.c
drivers/mtd/maps/gpio-addr-flash.c
drivers/mtd/maps/h720x-flash.c
drivers/mtd/maps/impa7.c
drivers/mtd/maps/intel_vr_nor.c
drivers/mtd/maps/ixp2000.c
drivers/mtd/maps/lantiq-flash.c
drivers/mtd/maps/latch-addr-flash.c
drivers/mtd/maps/physmap.c
drivers/mtd/maps/plat-ram.c
drivers/mtd/maps/pxa2xx-flash.c
drivers/mtd/maps/rbtx4939-flash.c
drivers/mtd/maps/sa1100-flash.c
drivers/mtd/maps/solutionengine.c
drivers/mtd/maps/wr_sbc82xx_flash.c
drivers/mtd/nand/atmel_nand.c
drivers/mtd/nand/bcm_umi_nand.c
drivers/mtd/nand/cafe_nand.c
drivers/mtd/nand/cmx270_nand.c
drivers/mtd/nand/cs553x_nand.c
drivers/mtd/nand/davinci_nand.c
drivers/mtd/nand/fsmc_nand.c
drivers/mtd/nand/h1910.c
drivers/mtd/nand/jz4740_nand.c
drivers/mtd/nand/mxc_nand.c
drivers/mtd/nand/omap2.c
drivers/mtd/nand/orion_nand.c
drivers/mtd/nand/plat_nand.c
drivers/mtd/nand/ppchameleonevb.c
drivers/mtd/nand/pxa3xx_nand.c
drivers/mtd/nand/s3c2410.c
drivers/mtd/nand/sharpsl.c
drivers/mtd/nand/tmio_nand.c
drivers/mtd/nand/txx9ndfmc.c
drivers/mtd/onenand/generic.c
drivers/mtd/onenand/omap2.c
drivers/mtd/onenand/samsung.c

index 0a430e06f5e5e11f3989265a1f49336d1b10abee..e44a55bc7f0dc13c5901a47ddfb00c5c6ed8f6d5 100644 (file)
@@ -60,7 +60,7 @@ static int __init flash_init(void)
                if (mymtd) {
                        mymtd->owner = THIS_MODULE;
                        mtd_device_parse_register(mymtd, part_probe_types,
-                                                 0, NULL, 0);
+                                                 NULL, NULL, 0);
                } else {
                        pr_err("Failed to register MTD device for flash\n");
                }
index f45dd37b771ec134540795ee523166bda7f66bb5..f2016b5f59b60d551a9b888b06e5ea08cd49748b 100644 (file)
@@ -851,7 +851,7 @@ static int spear_smi_setup_banks(struct platform_device *pdev, u32 bank)
                        goto err_map;
                }
        }
-       ret = mtd_device_parse_register(&flash->mtd, NULL, 0, parts, count);
+       ret = mtd_device_parse_register(&flash->mtd, NULL, NULL, parts, count);
        if (ret)
                dev_err(&dev->pdev->dev, "Err MTD partition=%d\n", ret);
 
index 51b2df33b8e9b3387d1d7863a6a3447f2bedaacd..ab8a2f4c8d60cfac01c332e9e4aa9e488d6f7f11 100644 (file)
@@ -399,9 +399,9 @@ static int __devinit sst25l_probe(struct spi_device *spi)
              flash->mtd.numeraseregions);
 
 
-       ret = mtd_device_parse_register(&flash->mtd, NULL, 0,
-                       data ? data->parts : NULL,
-                       data ? data->nr_parts : 0);
+       ret = mtd_device_parse_register(&flash->mtd, NULL, NULL,
+                                       data ? data->parts : NULL,
+                                       data ? data->nr_parts : 0);
        if (ret) {
                kfree(flash);
                dev_set_drvdata(&spi->dev, NULL);
index 650126c361f18865d9e29b346fdeb8650208f9b6..ef5cde84a8b3bb962f1d7291e00c761ebdee729c 100644 (file)
@@ -164,8 +164,8 @@ static int __devinit bfin_flash_probe(struct platform_device *pdev)
                return -ENXIO;
        }
 
-       mtd_device_parse_register(state->mtd, part_probe_types, 0,
-                       pdata->parts, pdata->nr_parts);
+       mtd_device_parse_register(state->mtd, part_probe_types, NULL,
+                                 pdata->parts, pdata->nr_parts);
 
        platform_set_drvdata(pdev, state);
 
index f43b365b848c41ebf2e1a8614762de835b84bbbe..080f06053bd449d51467f3ab294acfe05289ed34 100644 (file)
@@ -196,7 +196,7 @@ static int __init init_dc21285(void)
 
        dc21285_mtd->owner = THIS_MODULE;
 
-       mtd_device_parse_register(dc21285_mtd, probes, 0, NULL, 0);
+       mtd_device_parse_register(dc21285_mtd, probes, NULL, NULL, 0);
 
        if(machine_is_ebsa285()) {
                /*
index 33cce895859f0f8959cea03f06f28d24d9567b26..e4de96ba52b3529117418e842d48bdee064de94c 100644 (file)
@@ -252,8 +252,8 @@ static int __devinit gpio_flash_probe(struct platform_device *pdev)
        }
 
 
-       mtd_device_parse_register(state->mtd, part_probe_types, 0,
-                       pdata->parts, pdata->nr_parts);
+       mtd_device_parse_register(state->mtd, part_probe_types, NULL,
+                                 pdata->parts, pdata->nr_parts);
 
        return 0;
 }
index 49c14187fc66dc0e469f071db2971d2c0ca4be10..8ed6cb4529d82996b4981d9cff366b55673cb88b 100644 (file)
@@ -85,8 +85,8 @@ static int __init h720x_mtd_init(void)
        if (mymtd) {
                mymtd->owner = THIS_MODULE;
 
-               mtd_device_parse_register(mymtd, NULL, 0,
-                               h720x_partitions, NUM_PARTITIONS);
+               mtd_device_parse_register(mymtd, NULL, NULL,
+                                         h720x_partitions, NUM_PARTITIONS);
                return 0;
        }
 
index f47aedb24366bb0f1073a1d6c5803a103f029709..834a06c56f565ca466276474aebb2aea360fb97b 100644 (file)
@@ -91,7 +91,7 @@ static int __init init_impa7(void)
                if (impa7_mtd[i]) {
                        impa7_mtd[i]->owner = THIS_MODULE;
                        devicesfound++;
-                       mtd_device_parse_register(impa7_mtd[i], NULL, 0,
+                       mtd_device_parse_register(impa7_mtd[i], NULL, NULL,
                                                  partitions,
                                                  ARRAY_SIZE(partitions));
                }
index 08c239604ee44e1b71438feda4d30f065b0663f6..92e1f41634c7135ffc1b39d50c0323f0de33c603 100644 (file)
@@ -72,7 +72,7 @@ static int __devinit vr_nor_init_partitions(struct vr_nor_mtd *p)
 {
        /* register the flash bank */
        /* partition the flash bank */
-       return mtd_device_parse_register(p->info, NULL, 0, NULL, 0);
+       return mtd_device_parse_register(p->info, NULL, NULL, NULL, 0);
 }
 
 static void __devexit vr_nor_destroy_mtd_setup(struct vr_nor_mtd *p)
index fc7d4d0d9a4e4c31532577705f65209ffc1dbc7b..4a41ced0f71099045fcbd40f3db6aa9bd10ca401 100644 (file)
@@ -226,7 +226,7 @@ static int ixp2000_flash_probe(struct platform_device *dev)
        }
        info->mtd->owner = THIS_MODULE;
 
-       err = mtd_device_parse_register(info->mtd, probes, 0, NULL, 0);
+       err = mtd_device_parse_register(info->mtd, probes, NULL, NULL, 0);
        if (err)
                goto Error;
 
index cf7a3cddad35dbecd3107ba0e3475706f5da4b64..b5401e355745bfd4ce1e92732151e5fd34e0e9e0 100644 (file)
@@ -169,8 +169,9 @@ ltq_mtd_probe(struct platform_device *pdev)
        cfi->addr_unlock1 ^= 1;
        cfi->addr_unlock2 ^= 1;
 
-       err = mtd_device_parse_register(ltq_mtd->mtd, ltq_probe_types, 0,
-                       ltq_mtd_data->parts, ltq_mtd_data->nr_parts);
+       err = mtd_device_parse_register(ltq_mtd->mtd, ltq_probe_types, NULL,
+                                       ltq_mtd_data->parts,
+                                       ltq_mtd_data->nr_parts);
        if (err) {
                dev_err(&pdev->dev, "failed to add partitions\n");
                goto err_destroy;
index 8fed58e3a4a808e9423f3e36b02eeb7e5b5276e2..3c7ad17fca78e06a593f350e3463d113b17dfa76 100644 (file)
@@ -199,8 +199,9 @@ static int __devinit latch_addr_flash_probe(struct platform_device *dev)
        }
        info->mtd->owner = THIS_MODULE;
 
-       mtd_device_parse_register(info->mtd, NULL, 0,
-                       latch_addr_data->parts, latch_addr_data->nr_parts);
+       mtd_device_parse_register(info->mtd, NULL, NULL,
+                                 latch_addr_data->parts,
+                                 latch_addr_data->nr_parts);
        return 0;
 
 iounmap:
index 7e9233c503ab763832fbfead6cb687177f668dc0..21b0b713cacb8fd8cb1870b6341ac69c08354d19 100644 (file)
@@ -192,7 +192,7 @@ static int physmap_flash_probe(struct platform_device *dev)
 
        part_types = physmap_data->part_probe_types ? : part_probe_types;
 
-       mtd_device_parse_register(info->cmtd, part_types, 0,
+       mtd_device_parse_register(info->cmtd, part_types, NULL,
                                  physmap_data->parts, physmap_data->nr_parts);
        return 0;
 
index 45876d0e5b8e500b321466fad5789d7a9bfbe182..891558de3ec19d1ef67ca69751be8f06e21e480f 100644 (file)
@@ -222,8 +222,9 @@ static int platram_probe(struct platform_device *pdev)
        /* check to see if there are any available partitions, or wether
         * to add this device whole */
 
-       err = mtd_device_parse_register(info->mtd, pdata->probes, 0,
-                       pdata->partitions, pdata->nr_partitions);
+       err = mtd_device_parse_register(info->mtd, pdata->probes, NULL,
+                                       pdata->partitions,
+                                       pdata->nr_partitions);
        if (!err)
                dev_info(&pdev->dev, "registered mtd device\n");
 
index 436d121185b15a230878f6091ab5041270fe6d92..81884c277405e9d35d114e75c2e5f5d90e714652 100644 (file)
@@ -98,7 +98,8 @@ static int __devinit pxa2xx_flash_probe(struct platform_device *pdev)
        }
        info->mtd->owner = THIS_MODULE;
 
-       mtd_device_parse_register(info->mtd, probes, 0, flash->parts, flash->nr_parts);
+       mtd_device_parse_register(info->mtd, probes, NULL, flash->parts,
+                                 flash->nr_parts);
 
        platform_set_drvdata(pdev, info);
        return 0;
index 3da63fc6f16eb4faf522fdaa5b230b18c70c7354..6f52e1f288b674074f3045667c35678a09cb6f98 100644 (file)
@@ -102,8 +102,8 @@ static int rbtx4939_flash_probe(struct platform_device *dev)
        info->mtd->owner = THIS_MODULE;
        if (err)
                goto err_out;
-       err = mtd_device_parse_register(info->mtd, NULL, 0,
-                       pdata->parts, pdata->nr_parts);
+       err = mtd_device_parse_register(info->mtd, NULL, NULL, pdata->parts,
+                                       pdata->nr_parts);
 
        if (err)
                goto err_out;
index 1eaf7b6c35e59eb0c13dbb7a137efdae25293caa..a675bdbcb0fe882790c47a9929c55b4b382e7577 100644 (file)
@@ -264,8 +264,8 @@ static int __devinit sa1100_mtd_probe(struct platform_device *pdev)
        /*
         * Partition selection stuff.
         */
-       mtd_device_parse_register(info->mtd, part_probes, 0,
-                       plat->parts, plat->nr_parts);
+       mtd_device_parse_register(info->mtd, part_probes, NULL, plat->parts,
+                                 plat->nr_parts);
 
        platform_set_drvdata(pdev, info);
        err = 0;
index 496c40704aff6567dcd7546b0cb9c87742222263..9d900ada67084535daa04aa5dd1effb7d9053857 100644 (file)
@@ -92,8 +92,8 @@ static int __init init_soleng_maps(void)
                mtd_device_register(eprom_mtd, NULL, 0);
        }
 
-       mtd_device_parse_register(flash_mtd, probes, 0,
-                       superh_se_partitions, NUM_PARTITIONS);
+       mtd_device_parse_register(flash_mtd, probes, NULL,
+                                 superh_se_partitions, NUM_PARTITIONS);
 
        return 0;
 }
index aa7e0cb2893c791311e71356ec79d074745129a6..71b0ba7979121f8cde4480751f547d42d8fa858b 100644 (file)
@@ -142,7 +142,7 @@ static int __init init_sbc82xx_flash(void)
                        nr_parts = ARRAY_SIZE(smallflash_parts);
                }
 
-               mtd_device_parse_register(sbcmtd[i], part_probes, 0,
+               mtd_device_parse_register(sbcmtd[i], part_probes, NULL,
                                          defparts, nr_parts);
        }
        return 0;
index 35b4fb55dbd6569dad6d4c927c9807698804b882..7769519a54a7036ceeddff614f4db7d09f22ed8f 100644 (file)
@@ -650,8 +650,8 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
        }
 
        mtd->name = "atmel_nand";
-       res = mtd_device_parse_register(mtd, NULL, 0,
-                       host->board->parts, host->board->num_parts);
+       res = mtd_device_parse_register(mtd, NULL, NULL, host->board->parts,
+                                       host->board->num_parts);
        if (!res)
                return res;
 
index 50387fd4009bdbe464af98703e0653debf4baaf6..ee81b6333f6a51b7a42e499131386b16b33eea59 100644 (file)
@@ -488,7 +488,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev)
 
        /* Register the partitions */
        board_mtd->name = "bcm_umi-nand";
-       mtd_device_parse_register(board_mtd, NULL, 0, NULL, 0);
+       mtd_device_parse_register(board_mtd, NULL, NULL, NULL, 0);
 
        /* Return happy */
        return 0;
index 72d3f23490c58a548c962b1771c44f3781560da9..c23c07c5b3910428782e64db57312dfe93ce80ee 100644 (file)
@@ -799,7 +799,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
        pci_set_drvdata(pdev, mtd);
 
        mtd->name = "cafe_nand";
-       mtd_device_parse_register(mtd, part_probes, 0, NULL, 0);
+       mtd_device_parse_register(mtd, part_probes, NULL, NULL, 0);
 
        goto out;
 
index 737ef9a04fdbf35dc03253e49d26281ade9fff95..1024bfc05c8696485861e35b630522c44810d674 100644 (file)
@@ -219,7 +219,7 @@ static int __init cmx270_init(void)
        }
 
        /* Register the partitions */
-       ret = mtd_device_parse_register(cmx270_nand_mtd, NULL, 0,
+       ret = mtd_device_parse_register(cmx270_nand_mtd, NULL, NULL,
                                        partition_info, NUM_PARTITIONS);
        if (ret)
                goto err_scan;
index 414afa7935637522709f6273f2df9930a1170a6a..e2b7c9e4c5c2cb677b670cca433324919d79d8a3 100644 (file)
@@ -313,7 +313,7 @@ static int __init cs553x_init(void)
        for (i = 0; i < NR_CS553X_CONTROLLERS; i++) {
                if (cs553x_mtd[i]) {
                        /* If any devices registered, return success. Else the last error. */
-                       mtd_device_parse_register(cs553x_mtd[i], NULL, 0,
+                       mtd_device_parse_register(cs553x_mtd[i], NULL, NULL,
                                                  NULL, 0);
                        err = 0;
                }
index 6e566156956f2465e32b122d7728d9890ed98f08..b81afc748fff90acdfd919fbed8ec2c4d0b9d864 100644 (file)
@@ -752,8 +752,8 @@ syndrome_done:
        if (ret < 0)
                goto err_scan;
 
-       ret = mtd_device_parse_register(&info->mtd, NULL, 0,
-                       pdata->parts, pdata->nr_parts);
+       ret = mtd_device_parse_register(&info->mtd, NULL, NULL, pdata->parts,
+                                       pdata->nr_parts);
 
        if (ret < 0)
                goto err_scan;
index 4a018d0b70341103fdbeff588c28b09a8de94afb..341086c22e90587384a5d76325bef6b2e4d1c1f6 100644 (file)
@@ -940,13 +940,13 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
         * Check for partition info passed
         */
        host->mtd.name = "nand";
-       ret = mtd_device_parse_register(&host->mtd, NULL, 0,
-                       host->mtd.size <= 0x04000000 ?
-                               partition_info_16KB_blk :
-                               partition_info_128KB_blk,
-                       host->mtd.size <= 0x04000000 ?
-                               ARRAY_SIZE(partition_info_16KB_blk) :
-                               ARRAY_SIZE(partition_info_128KB_blk));
+       ret = mtd_device_parse_register(&host->mtd, NULL, NULL,
+                                       host->mtd.size <= 0x04000000 ?
+                                       partition_info_16KB_blk :
+                                       partition_info_128KB_blk,
+                                       host->mtd.size <= 0x04000000 ?
+                                       ARRAY_SIZE(partition_info_16KB_blk) :
+                                       ARRAY_SIZE(partition_info_128KB_blk));
        if (ret)
                goto err_probe;
 
index 5dc6f0d92f1af7be563fd269b70ee505b0a08b9c..11e487813428735082ce544ace9d150345ef68d1 100644 (file)
@@ -135,8 +135,8 @@ static int __init h1910_init(void)
        }
 
        /* Register the partitions */
-       mtd_device_parse_register(h1910_nand_mtd, NULL, 0,
-                       partition_info, NUM_PARTITIONS);
+       mtd_device_parse_register(h1910_nand_mtd, NULL, NULL, partition_info,
+                                 NUM_PARTITIONS);
 
        /* Return happy */
        return 0;
index ac3b9f255e009bd2696688c5d3673e60395be5d7..cc50e35cdc3d664f6d6ff20b25eeac65399ff2e0 100644 (file)
@@ -367,9 +367,9 @@ static int __devinit jz_nand_probe(struct platform_device *pdev)
                goto err_gpio_free;
        }
 
-       ret = mtd_device_parse_register(mtd, NULL, 0,
-                       pdata ? pdata->partitions : NULL,
-                       pdata ? pdata->num_partitions : 0);
+       ret = mtd_device_parse_register(mtd, NULL, NULL,
+                                       pdata ? pdata->partitions : NULL,
+                                       pdata ? pdata->num_partitions : 0);
 
        if (ret) {
                dev_err(&pdev->dev, "Failed to add mtd device\n");
index 74a43b818d0e0401616dcc5ace7af52bcf53c726..3c4c0533191d5e59c7546f81f2465719e8b4ee99 100644 (file)
@@ -1226,8 +1226,8 @@ static int __init mxcnd_probe(struct platform_device *pdev)
        }
 
        /* Register the partitions */
-       mtd_device_parse_register(mtd, part_probes, 0,
-                       pdata->parts, pdata->nr_parts);
+       mtd_device_parse_register(mtd, part_probes, NULL, pdata->parts,
+                                 pdata->nr_parts);
 
        platform_set_drvdata(pdev, host);
 
index b3a883e2a22f63942f83e245304f2de82fcdf116..d2e7a7da81f87e252697456644681d92c7315c14 100644 (file)
@@ -1101,8 +1101,8 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
                goto out_release_mem_region;
        }
 
-       mtd_device_parse_register(&info->mtd, NULL, 0,
-                       pdata->parts, pdata->nr_parts);
+       mtd_device_parse_register(&info->mtd, NULL, NULL, pdata->parts,
+                                 pdata->nr_parts);
 
        platform_set_drvdata(pdev, &info->mtd);
 
index 29f505adaf8411581fcbb8d78d09935bef07f36d..1d3bfb26080cc27c4ef322271c409b49a58ee70d 100644 (file)
@@ -129,8 +129,8 @@ static int __init orion_nand_probe(struct platform_device *pdev)
        }
 
        mtd->name = "orion_nand";
-       ret = mtd_device_parse_register(mtd, NULL, 0,
-                       board->parts, board->nr_parts);
+       ret = mtd_device_parse_register(mtd, NULL, NULL, board->parts,
+                                       board->nr_parts);
        if (ret) {
                nand_release(mtd);
                goto no_dev;
index 7f2da6953357f80f06bfab9404d411db53f6ef05..6404e6e81b101ad12b405a1cb1d689273b30c447 100644 (file)
@@ -99,8 +99,9 @@ static int __devinit plat_nand_probe(struct platform_device *pdev)
        }
 
        err = mtd_device_parse_register(&data->mtd,
-                       pdata->chip.part_probe_types, 0,
-                       pdata->chip.partitions, pdata->chip.nr_partitions);
+                                       pdata->chip.part_probe_types, NULL,
+                                       pdata->chip.partitions,
+                                       pdata->chip.nr_partitions);
 
        if (!err)
                return err;
index 7e52af51a1986a419e66501bc3286c1e53397651..0ddd90e5788f4faf189f34af5f2f2a0b4e5b9608 100644 (file)
@@ -275,11 +275,10 @@ static int __init ppchameleonevb_init(void)
        ppchameleon_mtd->name = "ppchameleon-nand";
 
        /* Register the partitions */
-       mtd_device_parse_register(ppchameleon_mtd, NULL, 0,
-                       ppchameleon_mtd->size == NAND_SMALL_SIZE ?
-                               partition_info_me :
-                               partition_info_hi,
-                       NUM_PARTITIONS);
+       mtd_device_parse_register(ppchameleon_mtd, NULL, NULL,
+                                 ppchameleon_mtd->size == NAND_SMALL_SIZE ?
+                                       partition_info_me : partition_info_hi,
+                                 NUM_PARTITIONS);
 
  nand_evb_init:
        /****************************
@@ -365,11 +364,10 @@ static int __init ppchameleonevb_init(void)
        ppchameleonevb_mtd->name = NAND_EVB_MTD_NAME;
 
        /* Register the partitions */
-       mtd_device_parse_register(ppchameleonevb_mtd, NULL, 0,
-                       ppchameleon_mtd->size == NAND_SMALL_SIZE ?
-                               partition_info_me :
-                               partition_info_hi,
-                       NUM_PARTITIONS);
+       mtd_device_parse_register(ppchameleonevb_mtd, NULL, NULL,
+                                 ppchameleon_mtd->size == NAND_SMALL_SIZE ?
+                                 partition_info_me : partition_info_hi,
+                                 NUM_PARTITIONS);
 
        /* Return happy */
        return 0;
index 5c3d719c37e6645d70385c3b75b71cf5992bdf7c..d3bdc909c9390dd7da8bab6cc7e6804b21de49e2 100644 (file)
@@ -1228,8 +1228,9 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
                        continue;
                }
 
-               ret = mtd_device_parse_register(info->host[cs]->mtd, NULL, 0,
-                               pdata->parts[cs], pdata->nr_parts[cs]);
+               ret = mtd_device_parse_register(info->host[cs]->mtd, NULL,
+                                               NULL, pdata->parts[cs],
+                                               pdata->nr_parts[cs]);
                if (!ret)
                        probe_success = 1;
        }
index 868685db6712fa3c18b593b4e9a171707f68f228..97623be04e0f323066673058905dd8f683730fdb 100644 (file)
@@ -751,8 +751,8 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
        if (set)
                mtd->mtd.name = set->name;
 
-       return mtd_device_parse_register(&mtd->mtd, NULL, 0,
-                       set->partitions, set->nr_partitions);
+       return mtd_device_parse_register(&mtd->mtd, NULL, NULL,
+                                        set->partitions, set->nr_partitions);
 }
 
 /**
index b175c0fd8b9378009ecbcbf2ad6ad3cbf9b6f8a7..2d269a53f8bbb72385617fe8ee6704a656561ed1 100644 (file)
@@ -181,8 +181,8 @@ static int __devinit sharpsl_nand_probe(struct platform_device *pdev)
        /* Register the partitions */
        sharpsl->mtd.name = "sharpsl-nand";
 
-       err = mtd_device_parse_register(&sharpsl->mtd, NULL, 0,
-                       data->partitions, data->nr_partitions);
+       err = mtd_device_parse_register(&sharpsl->mtd, NULL, NULL,
+                                       data->partitions, data->nr_partitions);
        if (err)
                goto err_add;
 
index 6caa0cd9d6a7c23394d815516f321ae32ed97983..060848a91db706d0804278f5c84978bf01b2a5d4 100644 (file)
@@ -456,9 +456,9 @@ static int tmio_probe(struct platform_device *dev)
                goto err_scan;
        }
        /* Register the partitions */
-       retval = mtd_device_parse_register(mtd, NULL, 0,
-                       data ? data->partition : NULL,
-                       data ? data->num_partitions : 0);
+       retval = mtd_device_parse_register(mtd, NULL, NULL,
+                                          data ? data->partition : NULL,
+                                          data ? data->num_partitions : 0);
        if (!retval)
                return retval;
 
index c7c4f1d11c77f2f9cb1a41700f58549377d5ea64..8db0acbae6fa8507c82201c0599ec44c827d28ce 100644 (file)
@@ -386,7 +386,7 @@ static int __init txx9ndfmc_probe(struct platform_device *dev)
                }
                mtd->name = txx9_priv->mtdname;
 
-               mtd_device_parse_register(mtd, NULL, 0, NULL, 0);
+               mtd_device_parse_register(mtd, NULL, NULL, NULL, 0);
                drvdata->mtds[i] = mtd;
        }
 
index 0ccd5bff254459323827bd1f54b69d65b990c510..1c4f97c63e623e518367be0a178beec800e0ceb5 100644 (file)
@@ -70,9 +70,9 @@ static int __devinit generic_onenand_probe(struct platform_device *pdev)
                goto out_iounmap;
        }
 
-       err = mtd_device_parse_register(&info->mtd, NULL, 0,
-                       pdata ? pdata->parts : NULL,
-                       pdata ? pdata->nr_parts : 0);
+       err = mtd_device_parse_register(&info->mtd, NULL, NULL,
+                                       pdata ? pdata->parts : NULL,
+                                       pdata ? pdata->nr_parts : 0);
 
        platform_set_drvdata(pdev, info);
 
index 7e9ea6852b671d3e1b09f1c259eee49be3ecb968..398a827838480a41b4dbd71d4df4ed4b2a9d6e93 100644 (file)
@@ -751,9 +751,9 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
        if ((r = onenand_scan(&c->mtd, 1)) < 0)
                goto err_release_regulator;
 
-       r = mtd_device_parse_register(&c->mtd, NULL, 0,
-                       pdata ? pdata->parts : NULL,
-                       pdata ? pdata->nr_parts : 0);
+       r = mtd_device_parse_register(&c->mtd, NULL, NULL,
+                                     pdata ? pdata->parts : NULL,
+                                     pdata ? pdata->nr_parts : 0);
        if (r)
                goto err_release_onenand;
 
index deaf7628773fa694c79b2d68769ff6e89054f6d0..8e4b3f2742ba1793f013e6680e3058f1a9e424f9 100644 (file)
@@ -1014,7 +1014,7 @@ static int s3c_onenand_probe(struct platform_device *pdev)
        if (s3c_read_reg(MEM_CFG_OFFSET) & ONENAND_SYS_CFG1_SYNC_READ)
                dev_info(&onenand->pdev->dev, "OneNAND Sync. Burst Read enabled\n");
 
-       err = mtd_device_parse_register(mtd, NULL, 0,
+       err = mtd_device_parse_register(mtd, NULL, NULL,
                                        pdata ? pdata->parts : NULL,
                                        pdata ? pdata->nr_parts : 0);