diff options
Diffstat (limited to 'drivers/mtd/maps/gpio-addr-flash.c')
-rw-r--r-- | drivers/mtd/maps/gpio-addr-flash.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c index 7568c5f8b8a..1ec66f031c5 100644 --- a/drivers/mtd/maps/gpio-addr-flash.c +++ b/drivers/mtd/maps/gpio-addr-flash.c | |||
@@ -187,7 +187,6 @@ static const char *part_probe_types[] = { "cmdlinepart", "RedBoot", NULL }; | |||
187 | */ | 187 | */ |
188 | static int __devinit gpio_flash_probe(struct platform_device *pdev) | 188 | static int __devinit gpio_flash_probe(struct platform_device *pdev) |
189 | { | 189 | { |
190 | int nr_parts; | ||
191 | size_t i, arr_size; | 190 | size_t i, arr_size; |
192 | struct physmap_flash_data *pdata; | 191 | struct physmap_flash_data *pdata; |
193 | struct resource *memory; | 192 | struct resource *memory; |
@@ -252,20 +251,9 @@ static int __devinit gpio_flash_probe(struct platform_device *pdev) | |||
252 | return -ENXIO; | 251 | return -ENXIO; |
253 | } | 252 | } |
254 | 253 | ||
255 | nr_parts = parse_mtd_partitions(state->mtd, part_probe_types, | ||
256 | &pdata->parts, 0); | ||
257 | if (nr_parts > 0) { | ||
258 | pr_devinit(KERN_NOTICE PFX "Using commandline partition definition\n"); | ||
259 | kfree(pdata->parts); | ||
260 | } else if (pdata->nr_parts) { | ||
261 | pr_devinit(KERN_NOTICE PFX "Using board partition definition\n"); | ||
262 | nr_parts = pdata->nr_parts; | ||
263 | } else { | ||
264 | pr_devinit(KERN_NOTICE PFX "no partition info available, registering whole flash at once\n"); | ||
265 | nr_parts = 0; | ||
266 | } | ||
267 | 254 | ||
268 | mtd_device_register(state->mtd, pdata->parts, nr_parts); | 255 | mtd_device_parse_register(state->mtd, part_probe_types, 0, |
256 | pdata->parts, pdata->nr_parts); | ||
269 | 257 | ||
270 | return 0; | 258 | return 0; |
271 | } | 259 | } |