aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/latch-addr-flash.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/latch-addr-flash.c')
-rw-r--r--drivers/mtd/maps/latch-addr-flash.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/drivers/mtd/maps/latch-addr-flash.c b/drivers/mtd/maps/latch-addr-flash.c
index 5936c466e901..119baa7d7477 100644
--- a/drivers/mtd/maps/latch-addr-flash.c
+++ b/drivers/mtd/maps/latch-addr-flash.c
@@ -33,9 +33,6 @@ struct latch_addr_flash_info {
33 /* cache; could be found out of res */ 33 /* cache; could be found out of res */
34 unsigned long win_mask; 34 unsigned long win_mask;
35 35
36 int nr_parts;
37 struct mtd_partition *parts;
38
39 spinlock_t lock; 36 spinlock_t lock;
40}; 37};
41 38
@@ -97,8 +94,6 @@ static void lf_copy_from(struct map_info *map, void *to,
97 94
98static char *rom_probe_types[] = { "cfi_probe", NULL }; 95static char *rom_probe_types[] = { "cfi_probe", NULL };
99 96
100static char *part_probe_types[] = { "cmdlinepart", NULL };
101
102static int latch_addr_flash_remove(struct platform_device *dev) 97static int latch_addr_flash_remove(struct platform_device *dev)
103{ 98{
104 struct latch_addr_flash_info *info; 99 struct latch_addr_flash_info *info;
@@ -112,8 +107,6 @@ static int latch_addr_flash_remove(struct platform_device *dev)
112 latch_addr_data = dev->dev.platform_data; 107 latch_addr_data = dev->dev.platform_data;
113 108
114 if (info->mtd != NULL) { 109 if (info->mtd != NULL) {
115 if (info->nr_parts)
116 kfree(info->parts);
117 mtd_device_unregister(info->mtd); 110 mtd_device_unregister(info->mtd);
118 map_destroy(info->mtd); 111 map_destroy(info->mtd);
119 } 112 }
@@ -206,21 +199,8 @@ static int __devinit latch_addr_flash_probe(struct platform_device *dev)
206 } 199 }
207 info->mtd->owner = THIS_MODULE; 200 info->mtd->owner = THIS_MODULE;
208 201
209 err = parse_mtd_partitions(info->mtd, (const char **)part_probe_types, 202 mtd_device_parse_register(info->mtd, NULL, 0,
210 &info->parts, 0); 203 latch_addr_data->parts, latch_addr_data->nr_parts);
211 if (err > 0) {
212 mtd_device_register(info->mtd, info->parts, err);
213 return 0;
214 }
215 if (latch_addr_data->nr_parts) {
216 pr_notice("Using latch-addr-flash partition information\n");
217 mtd_device_register(info->mtd,
218 latch_addr_data->parts,
219 latch_addr_data->nr_parts);
220 return 0;
221 }
222
223 mtd_device_register(info->mtd, NULL, 0);
224 return 0; 204 return 0;
225 205
226iounmap: 206iounmap: