aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/ixp2000.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/ixp2000.c')
-rw-r--r--drivers/mtd/maps/ixp2000.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c
index 1594a802631d..437fcd2f352f 100644
--- a/drivers/mtd/maps/ixp2000.c
+++ b/drivers/mtd/maps/ixp2000.c
@@ -38,7 +38,6 @@
38struct ixp2000_flash_info { 38struct ixp2000_flash_info {
39 struct mtd_info *mtd; 39 struct mtd_info *mtd;
40 struct map_info map; 40 struct map_info map;
41 struct mtd_partition *partitions;
42 struct resource *res; 41 struct resource *res;
43}; 42};
44 43
@@ -125,8 +124,6 @@ static int ixp2000_flash_remove(struct platform_device *dev)
125 if (info->map.map_priv_1) 124 if (info->map.map_priv_1)
126 iounmap((void *) info->map.map_priv_1); 125 iounmap((void *) info->map.map_priv_1);
127 126
128 kfree(info->partitions);
129
130 if (info->res) { 127 if (info->res) {
131 release_resource(info->res); 128 release_resource(info->res);
132 kfree(info->res); 129 kfree(info->res);
@@ -229,13 +226,7 @@ static int ixp2000_flash_probe(struct platform_device *dev)
229 } 226 }
230 info->mtd->owner = THIS_MODULE; 227 info->mtd->owner = THIS_MODULE;
231 228
232 err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); 229 err = mtd_device_parse_register(info->mtd, probes, 0, NULL, 0);
233 if (err > 0) {
234 err = mtd_device_register(info->mtd, info->partitions, err);
235 if(err)
236 dev_err(&dev->dev, "Could not parse partitions\n");
237 }
238
239 if (err) 230 if (err)
240 goto Error; 231 goto Error;
241 232