Commit 42d7fbe2 authored by Artem Bityutskiy's avatar Artem Bityutskiy Committed by David Woodhouse

mtd: do not use plain 0 as NULL

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: default avatarArtem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent ee478af8
...@@ -60,7 +60,7 @@ static int __init flash_init(void) ...@@ -60,7 +60,7 @@ static int __init flash_init(void)
if (mymtd) { if (mymtd) {
mymtd->owner = THIS_MODULE; mymtd->owner = THIS_MODULE;
mtd_device_parse_register(mymtd, part_probe_types, mtd_device_parse_register(mymtd, part_probe_types,
0, NULL, 0); NULL, NULL, 0);
} else { } else {
pr_err("Failed to register MTD device for flash\n"); pr_err("Failed to register MTD device for flash\n");
} }
......
...@@ -851,7 +851,7 @@ static int spear_smi_setup_banks(struct platform_device *pdev, u32 bank) ...@@ -851,7 +851,7 @@ static int spear_smi_setup_banks(struct platform_device *pdev, u32 bank)
goto err_map; 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) if (ret)
dev_err(&dev->pdev->dev, "Err MTD partition=%d\n", ret); dev_err(&dev->pdev->dev, "Err MTD partition=%d\n", ret);
......
...@@ -399,9 +399,9 @@ static int __devinit sst25l_probe(struct spi_device *spi) ...@@ -399,9 +399,9 @@ static int __devinit sst25l_probe(struct spi_device *spi)
flash->mtd.numeraseregions); flash->mtd.numeraseregions);
ret = mtd_device_parse_register(&flash->mtd, NULL, 0, ret = mtd_device_parse_register(&flash->mtd, NULL, NULL,
data ? data->parts : NULL, data ? data->parts : NULL,
data ? data->nr_parts : 0); data ? data->nr_parts : 0);
if (ret) { if (ret) {
kfree(flash); kfree(flash);
dev_set_drvdata(&spi->dev, NULL); dev_set_drvdata(&spi->dev, NULL);
......
...@@ -164,8 +164,8 @@ static int __devinit bfin_flash_probe(struct platform_device *pdev) ...@@ -164,8 +164,8 @@ static int __devinit bfin_flash_probe(struct platform_device *pdev)
return -ENXIO; return -ENXIO;
} }
mtd_device_parse_register(state->mtd, part_probe_types, 0, mtd_device_parse_register(state->mtd, part_probe_types, NULL,
pdata->parts, pdata->nr_parts); pdata->parts, pdata->nr_parts);
platform_set_drvdata(pdev, state); platform_set_drvdata(pdev, state);
......
...@@ -196,7 +196,7 @@ static int __init init_dc21285(void) ...@@ -196,7 +196,7 @@ static int __init init_dc21285(void)
dc21285_mtd->owner = THIS_MODULE; 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()) { if(machine_is_ebsa285()) {
/* /*
......
...@@ -252,8 +252,8 @@ static int __devinit gpio_flash_probe(struct platform_device *pdev) ...@@ -252,8 +252,8 @@ static int __devinit gpio_flash_probe(struct platform_device *pdev)
} }
mtd_device_parse_register(state->mtd, part_probe_types, 0, mtd_device_parse_register(state->mtd, part_probe_types, NULL,
pdata->parts, pdata->nr_parts); pdata->parts, pdata->nr_parts);
return 0; return 0;
} }
......
...@@ -85,8 +85,8 @@ static int __init h720x_mtd_init(void) ...@@ -85,8 +85,8 @@ static int __init h720x_mtd_init(void)
if (mymtd) { if (mymtd) {
mymtd->owner = THIS_MODULE; mymtd->owner = THIS_MODULE;
mtd_device_parse_register(mymtd, NULL, 0, mtd_device_parse_register(mymtd, NULL, NULL,
h720x_partitions, NUM_PARTITIONS); h720x_partitions, NUM_PARTITIONS);
return 0; return 0;
} }
......
...@@ -91,7 +91,7 @@ static int __init init_impa7(void) ...@@ -91,7 +91,7 @@ static int __init init_impa7(void)
if (impa7_mtd[i]) { if (impa7_mtd[i]) {
impa7_mtd[i]->owner = THIS_MODULE; impa7_mtd[i]->owner = THIS_MODULE;
devicesfound++; devicesfound++;
mtd_device_parse_register(impa7_mtd[i], NULL, 0, mtd_device_parse_register(impa7_mtd[i], NULL, NULL,
partitions, partitions,
ARRAY_SIZE(partitions)); ARRAY_SIZE(partitions));
} }
......
...@@ -72,7 +72,7 @@ static int __devinit vr_nor_init_partitions(struct vr_nor_mtd *p) ...@@ -72,7 +72,7 @@ static int __devinit vr_nor_init_partitions(struct vr_nor_mtd *p)
{ {
/* register the flash bank */ /* register the flash bank */
/* partition 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) static void __devexit vr_nor_destroy_mtd_setup(struct vr_nor_mtd *p)
......
...@@ -226,7 +226,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) ...@@ -226,7 +226,7 @@ static int ixp2000_flash_probe(struct platform_device *dev)
} }
info->mtd->owner = THIS_MODULE; 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) if (err)
goto Error; goto Error;
......
...@@ -169,8 +169,9 @@ ltq_mtd_probe(struct platform_device *pdev) ...@@ -169,8 +169,9 @@ ltq_mtd_probe(struct platform_device *pdev)
cfi->addr_unlock1 ^= 1; cfi->addr_unlock1 ^= 1;
cfi->addr_unlock2 ^= 1; cfi->addr_unlock2 ^= 1;
err = mtd_device_parse_register(ltq_mtd->mtd, ltq_probe_types, 0, err = mtd_device_parse_register(ltq_mtd->mtd, ltq_probe_types, NULL,
ltq_mtd_data->parts, ltq_mtd_data->nr_parts); ltq_mtd_data->parts,
ltq_mtd_data->nr_parts);
if (err) { if (err) {
dev_err(&pdev->dev, "failed to add partitions\n"); dev_err(&pdev->dev, "failed to add partitions\n");
goto err_destroy; goto err_destroy;
......
...@@ -199,8 +199,9 @@ static int __devinit latch_addr_flash_probe(struct platform_device *dev) ...@@ -199,8 +199,9 @@ static int __devinit latch_addr_flash_probe(struct platform_device *dev)
} }
info->mtd->owner = THIS_MODULE; info->mtd->owner = THIS_MODULE;
mtd_device_parse_register(info->mtd, NULL, 0, mtd_device_parse_register(info->mtd, NULL, NULL,
latch_addr_data->parts, latch_addr_data->nr_parts); latch_addr_data->parts,
latch_addr_data->nr_parts);
return 0; return 0;
iounmap: iounmap:
......
...@@ -192,7 +192,7 @@ static int physmap_flash_probe(struct platform_device *dev) ...@@ -192,7 +192,7 @@ static int physmap_flash_probe(struct platform_device *dev)
part_types = physmap_data->part_probe_types ? : part_probe_types; 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); physmap_data->parts, physmap_data->nr_parts);
return 0; return 0;
......
...@@ -222,8 +222,9 @@ static int platram_probe(struct platform_device *pdev) ...@@ -222,8 +222,9 @@ static int platram_probe(struct platform_device *pdev)
/* check to see if there are any available partitions, or wether /* check to see if there are any available partitions, or wether
* to add this device whole */ * to add this device whole */
err = mtd_device_parse_register(info->mtd, pdata->probes, 0, err = mtd_device_parse_register(info->mtd, pdata->probes, NULL,
pdata->partitions, pdata->nr_partitions); pdata->partitions,
pdata->nr_partitions);
if (!err) if (!err)
dev_info(&pdev->dev, "registered mtd device\n"); dev_info(&pdev->dev, "registered mtd device\n");
......
...@@ -98,7 +98,8 @@ static int __devinit pxa2xx_flash_probe(struct platform_device *pdev) ...@@ -98,7 +98,8 @@ static int __devinit pxa2xx_flash_probe(struct platform_device *pdev)
} }
info->mtd->owner = THIS_MODULE; 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); platform_set_drvdata(pdev, info);
return 0; return 0;
......
...@@ -102,8 +102,8 @@ static int rbtx4939_flash_probe(struct platform_device *dev) ...@@ -102,8 +102,8 @@ static int rbtx4939_flash_probe(struct platform_device *dev)
info->mtd->owner = THIS_MODULE; info->mtd->owner = THIS_MODULE;
if (err) if (err)
goto err_out; goto err_out;
err = mtd_device_parse_register(info->mtd, NULL, 0, err = mtd_device_parse_register(info->mtd, NULL, NULL, pdata->parts,
pdata->parts, pdata->nr_parts); pdata->nr_parts);
if (err) if (err)
goto err_out; goto err_out;
......
...@@ -264,8 +264,8 @@ static int __devinit sa1100_mtd_probe(struct platform_device *pdev) ...@@ -264,8 +264,8 @@ static int __devinit sa1100_mtd_probe(struct platform_device *pdev)
/* /*
* Partition selection stuff. * Partition selection stuff.
*/ */
mtd_device_parse_register(info->mtd, part_probes, 0, mtd_device_parse_register(info->mtd, part_probes, NULL, plat->parts,
plat->parts, plat->nr_parts); plat->nr_parts);
platform_set_drvdata(pdev, info); platform_set_drvdata(pdev, info);
err = 0; err = 0;
......
...@@ -92,8 +92,8 @@ static int __init init_soleng_maps(void) ...@@ -92,8 +92,8 @@ static int __init init_soleng_maps(void)
mtd_device_register(eprom_mtd, NULL, 0); mtd_device_register(eprom_mtd, NULL, 0);
} }
mtd_device_parse_register(flash_mtd, probes, 0, mtd_device_parse_register(flash_mtd, probes, NULL,
superh_se_partitions, NUM_PARTITIONS); superh_se_partitions, NUM_PARTITIONS);
return 0; return 0;
} }
......
...@@ -142,7 +142,7 @@ static int __init init_sbc82xx_flash(void) ...@@ -142,7 +142,7 @@ static int __init init_sbc82xx_flash(void)
nr_parts = ARRAY_SIZE(smallflash_parts); 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); defparts, nr_parts);
} }
return 0; return 0;
......
...@@ -650,8 +650,8 @@ static int __init atmel_nand_probe(struct platform_device *pdev) ...@@ -650,8 +650,8 @@ static int __init atmel_nand_probe(struct platform_device *pdev)
} }
mtd->name = "atmel_nand"; mtd->name = "atmel_nand";
res = mtd_device_parse_register(mtd, NULL, 0, res = mtd_device_parse_register(mtd, NULL, NULL, host->board->parts,
host->board->parts, host->board->num_parts); host->board->num_parts);
if (!res) if (!res)
return res; return res;
......
...@@ -488,7 +488,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev) ...@@ -488,7 +488,7 @@ static int __devinit bcm_umi_nand_probe(struct platform_device *pdev)
/* Register the partitions */ /* Register the partitions */
board_mtd->name = "bcm_umi-nand"; 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 happy */
return 0; return 0;
......
...@@ -799,7 +799,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev, ...@@ -799,7 +799,7 @@ static int __devinit cafe_nand_probe(struct pci_dev *pdev,
pci_set_drvdata(pdev, mtd); pci_set_drvdata(pdev, mtd);
mtd->name = "cafe_nand"; 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; goto out;
......
...@@ -219,7 +219,7 @@ static int __init cmx270_init(void) ...@@ -219,7 +219,7 @@ static int __init cmx270_init(void)
} }
/* Register the partitions */ /* 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); partition_info, NUM_PARTITIONS);
if (ret) if (ret)
goto err_scan; goto err_scan;
......
...@@ -313,7 +313,7 @@ static int __init cs553x_init(void) ...@@ -313,7 +313,7 @@ static int __init cs553x_init(void)
for (i = 0; i < NR_CS553X_CONTROLLERS; i++) { for (i = 0; i < NR_CS553X_CONTROLLERS; i++) {
if (cs553x_mtd[i]) { if (cs553x_mtd[i]) {
/* If any devices registered, return success. Else the last error. */ /* 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); NULL, 0);
err = 0; err = 0;
} }
......
...@@ -752,8 +752,8 @@ static int __init nand_davinci_probe(struct platform_device *pdev) ...@@ -752,8 +752,8 @@ static int __init nand_davinci_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
goto err_scan; goto err_scan;
ret = mtd_device_parse_register(&info->mtd, NULL, 0, ret = mtd_device_parse_register(&info->mtd, NULL, NULL, pdata->parts,
pdata->parts, pdata->nr_parts); pdata->nr_parts);
if (ret < 0) if (ret < 0)
goto err_scan; goto err_scan;
......
...@@ -940,13 +940,13 @@ static int __init fsmc_nand_probe(struct platform_device *pdev) ...@@ -940,13 +940,13 @@ static int __init fsmc_nand_probe(struct platform_device *pdev)
* Check for partition info passed * Check for partition info passed
*/ */
host->mtd.name = "nand"; host->mtd.name = "nand";
ret = mtd_device_parse_register(&host->mtd, NULL, 0, ret = mtd_device_parse_register(&host->mtd, NULL, NULL,
host->mtd.size <= 0x04000000 ? host->mtd.size <= 0x04000000 ?
partition_info_16KB_blk : partition_info_16KB_blk :
partition_info_128KB_blk, partition_info_128KB_blk,
host->mtd.size <= 0x04000000 ? host->mtd.size <= 0x04000000 ?
ARRAY_SIZE(partition_info_16KB_blk) : ARRAY_SIZE(partition_info_16KB_blk) :
ARRAY_SIZE(partition_info_128KB_blk)); ARRAY_SIZE(partition_info_128KB_blk));
if (ret) if (ret)
goto err_probe; goto err_probe;
......
...@@ -135,8 +135,8 @@ static int __init h1910_init(void) ...@@ -135,8 +135,8 @@ static int __init h1910_init(void)
} }
/* Register the partitions */ /* Register the partitions */
mtd_device_parse_register(h1910_nand_mtd, NULL, 0, mtd_device_parse_register(h1910_nand_mtd, NULL, NULL, partition_info,
partition_info, NUM_PARTITIONS); NUM_PARTITIONS);
/* Return happy */ /* Return happy */
return 0; return 0;
......
...@@ -367,9 +367,9 @@ static int __devinit jz_nand_probe(struct platform_device *pdev) ...@@ -367,9 +367,9 @@ static int __devinit jz_nand_probe(struct platform_device *pdev)
goto err_gpio_free; goto err_gpio_free;
} }
ret = mtd_device_parse_register(mtd, NULL, 0, ret = mtd_device_parse_register(mtd, NULL, NULL,
pdata ? pdata->partitions : NULL, pdata ? pdata->partitions : NULL,
pdata ? pdata->num_partitions : 0); pdata ? pdata->num_partitions : 0);
if (ret) { if (ret) {
dev_err(&pdev->dev, "Failed to add mtd device\n"); dev_err(&pdev->dev, "Failed to add mtd device\n");
......
...@@ -1226,8 +1226,8 @@ static int __init mxcnd_probe(struct platform_device *pdev) ...@@ -1226,8 +1226,8 @@ static int __init mxcnd_probe(struct platform_device *pdev)
} }
/* Register the partitions */ /* Register the partitions */
mtd_device_parse_register(mtd, part_probes, 0, mtd_device_parse_register(mtd, part_probes, NULL, pdata->parts,
pdata->parts, pdata->nr_parts); pdata->nr_parts);
platform_set_drvdata(pdev, host); platform_set_drvdata(pdev, host);
......
...@@ -1101,8 +1101,8 @@ static int __devinit omap_nand_probe(struct platform_device *pdev) ...@@ -1101,8 +1101,8 @@ static int __devinit omap_nand_probe(struct platform_device *pdev)
goto out_release_mem_region; goto out_release_mem_region;
} }
mtd_device_parse_register(&info->mtd, NULL, 0, mtd_device_parse_register(&info->mtd, NULL, NULL, pdata->parts,
pdata->parts, pdata->nr_parts); pdata->nr_parts);
platform_set_drvdata(pdev, &info->mtd); platform_set_drvdata(pdev, &info->mtd);
......
...@@ -129,8 +129,8 @@ static int __init orion_nand_probe(struct platform_device *pdev) ...@@ -129,8 +129,8 @@ static int __init orion_nand_probe(struct platform_device *pdev)
} }
mtd->name = "orion_nand"; mtd->name = "orion_nand";
ret = mtd_device_parse_register(mtd, NULL, 0, ret = mtd_device_parse_register(mtd, NULL, NULL, board->parts,
board->parts, board->nr_parts); board->nr_parts);
if (ret) { if (ret) {
nand_release(mtd); nand_release(mtd);
goto no_dev; goto no_dev;
......
...@@ -99,8 +99,9 @@ static int __devinit plat_nand_probe(struct platform_device *pdev) ...@@ -99,8 +99,9 @@ static int __devinit plat_nand_probe(struct platform_device *pdev)
} }
err = mtd_device_parse_register(&data->mtd, err = mtd_device_parse_register(&data->mtd,
pdata->chip.part_probe_types, 0, pdata->chip.part_probe_types, NULL,
pdata->chip.partitions, pdata->chip.nr_partitions); pdata->chip.partitions,
pdata->chip.nr_partitions);
if (!err) if (!err)
return err; return err;
......
...@@ -275,11 +275,10 @@ static int __init ppchameleonevb_init(void) ...@@ -275,11 +275,10 @@ static int __init ppchameleonevb_init(void)
ppchameleon_mtd->name = "ppchameleon-nand"; ppchameleon_mtd->name = "ppchameleon-nand";
/* Register the partitions */ /* Register the partitions */
mtd_device_parse_register(ppchameleon_mtd, NULL, 0, mtd_device_parse_register(ppchameleon_mtd, NULL, NULL,
ppchameleon_mtd->size == NAND_SMALL_SIZE ? ppchameleon_mtd->size == NAND_SMALL_SIZE ?
partition_info_me : partition_info_me : partition_info_hi,
partition_info_hi, NUM_PARTITIONS);
NUM_PARTITIONS);
nand_evb_init: nand_evb_init:
/**************************** /****************************
...@@ -365,11 +364,10 @@ static int __init ppchameleonevb_init(void) ...@@ -365,11 +364,10 @@ static int __init ppchameleonevb_init(void)
ppchameleonevb_mtd->name = NAND_EVB_MTD_NAME; ppchameleonevb_mtd->name = NAND_EVB_MTD_NAME;
/* Register the partitions */ /* Register the partitions */
mtd_device_parse_register(ppchameleonevb_mtd, NULL, 0, mtd_device_parse_register(ppchameleonevb_mtd, NULL, NULL,
ppchameleon_mtd->size == NAND_SMALL_SIZE ? ppchameleon_mtd->size == NAND_SMALL_SIZE ?
partition_info_me : partition_info_me : partition_info_hi,
partition_info_hi, NUM_PARTITIONS);
NUM_PARTITIONS);
/* Return happy */ /* Return happy */
return 0; return 0;
......
...@@ -1228,8 +1228,9 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) ...@@ -1228,8 +1228,9 @@ static int pxa3xx_nand_probe(struct platform_device *pdev)
continue; continue;
} }
ret = mtd_device_parse_register(info->host[cs]->mtd, NULL, 0, ret = mtd_device_parse_register(info->host[cs]->mtd, NULL,
pdata->parts[cs], pdata->nr_parts[cs]); NULL, pdata->parts[cs],
pdata->nr_parts[cs]);
if (!ret) if (!ret)
probe_success = 1; probe_success = 1;
} }
......
...@@ -751,8 +751,8 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info, ...@@ -751,8 +751,8 @@ static int s3c2410_nand_add_partition(struct s3c2410_nand_info *info,
if (set) if (set)
mtd->mtd.name = set->name; mtd->mtd.name = set->name;
return mtd_device_parse_register(&mtd->mtd, NULL, 0, return mtd_device_parse_register(&mtd->mtd, NULL, NULL,
set->partitions, set->nr_partitions); set->partitions, set->nr_partitions);
} }
/** /**
......
...@@ -181,8 +181,8 @@ static int __devinit sharpsl_nand_probe(struct platform_device *pdev) ...@@ -181,8 +181,8 @@ static int __devinit sharpsl_nand_probe(struct platform_device *pdev)
/* Register the partitions */ /* Register the partitions */
sharpsl->mtd.name = "sharpsl-nand"; sharpsl->mtd.name = "sharpsl-nand";
err = mtd_device_parse_register(&sharpsl->mtd, NULL, 0, err = mtd_device_parse_register(&sharpsl->mtd, NULL, NULL,
data->partitions, data->nr_partitions); data->partitions, data->nr_partitions);
if (err) if (err)
goto err_add; goto err_add;
......
...@@ -456,9 +456,9 @@ static int tmio_probe(struct platform_device *dev) ...@@ -456,9 +456,9 @@ static int tmio_probe(struct platform_device *dev)
goto err_scan; goto err_scan;
} }
/* Register the partitions */ /* Register the partitions */
retval = mtd_device_parse_register(mtd, NULL, 0, retval = mtd_device_parse_register(mtd, NULL, NULL,
data ? data->partition : NULL, data ? data->partition : NULL,
data ? data->num_partitions : 0); data ? data->num_partitions : 0);
if (!retval) if (!retval)
return retval; return retval;
......
...@@ -386,7 +386,7 @@ static int __init txx9ndfmc_probe(struct platform_device *dev) ...@@ -386,7 +386,7 @@ static int __init txx9ndfmc_probe(struct platform_device *dev)
} }
mtd->name = txx9_priv->mtdname; 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; drvdata->mtds[i] = mtd;
} }
......
...@@ -70,9 +70,9 @@ static int __devinit generic_onenand_probe(struct platform_device *pdev) ...@@ -70,9 +70,9 @@ static int __devinit generic_onenand_probe(struct platform_device *pdev)
goto out_iounmap; goto out_iounmap;
} }
err = mtd_device_parse_register(&info->mtd, NULL, 0, err = mtd_device_parse_register(&info->mtd, NULL, NULL,
pdata ? pdata->parts : NULL, pdata ? pdata->parts : NULL,
pdata ? pdata->nr_parts : 0); pdata ? pdata->nr_parts : 0);
platform_set_drvdata(pdev, info); platform_set_drvdata(pdev, info);
......
...@@ -751,9 +751,9 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) ...@@ -751,9 +751,9 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev)
if ((r = onenand_scan(&c->mtd, 1)) < 0) if ((r = onenand_scan(&c->mtd, 1)) < 0)
goto err_release_regulator; goto err_release_regulator;
r = mtd_device_parse_register(&c->mtd, NULL, 0, r = mtd_device_parse_register(&c->mtd, NULL, NULL,
pdata ? pdata->parts : NULL, pdata ? pdata->parts : NULL,
pdata ? pdata->nr_parts : 0); pdata ? pdata->nr_parts : 0);
if (r) if (r)
goto err_release_onenand; goto err_release_onenand;
......
...@@ -1014,7 +1014,7 @@ static int s3c_onenand_probe(struct platform_device *pdev) ...@@ -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) if (s3c_read_reg(MEM_CFG_OFFSET) & ONENAND_SYS_CFG1_SYNC_READ)
dev_info(&onenand->pdev->dev, "OneNAND Sync. Burst Read enabled\n"); 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->parts : NULL,
pdata ? pdata->nr_parts : 0); pdata ? pdata->nr_parts : 0);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment