From e7595206e94b2903fac5054fd952339201cfa762 Mon Sep 17 00:00:00 2001 From: Dmitry Eremin-Solenikov Date: Thu, 2 Jun 2011 17:59:58 +0400 Subject: [PATCH] --- yaml --- r: 274831 b: refs/heads/master c: d45fd1218897b05dfa977a49f72e6f7bdc3e2471 h: refs/heads/master i: 274829: 92214affde2726ed266448923700216b79c8367f 274827: c07478ee6918297643ab187ce26c50e5b433a1e5 274823: 4b2d9728d8269d43b123c7083cb96c9756c9f53c 274815: 151db1354bbc86308ea678831cddc39e02d2a7c2 v: v3 --- [refs] | 2 +- trunk/drivers/mtd/maps/physmap.c | 23 ++--------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/[refs] b/[refs] index c36e3678dc59..83f2c71dd013 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 6e6e44c8bf73cdbd3600f18cb195fc965c0f1b45 +refs/heads/master: d45fd1218897b05dfa977a49f72e6f7bdc3e2471 diff --git a/trunk/drivers/mtd/maps/physmap.c b/trunk/drivers/mtd/maps/physmap.c index 2174d103297e..66e8200079c2 100644 --- a/trunk/drivers/mtd/maps/physmap.c +++ b/trunk/drivers/mtd/maps/physmap.c @@ -27,8 +27,6 @@ struct physmap_flash_info { struct mtd_info *mtd[MAX_RESOURCES]; struct mtd_info *cmtd; struct map_info map[MAX_RESOURCES]; - int nr_parts; - struct mtd_partition *parts; }; static int physmap_flash_remove(struct platform_device *dev) @@ -46,8 +44,6 @@ static int physmap_flash_remove(struct platform_device *dev) if (info->cmtd) { mtd_device_unregister(info->cmtd); - if (info->nr_parts) - kfree(info->parts); if (info->cmtd != info->mtd[0]) mtd_concat_destroy(info->cmtd); } @@ -175,23 +171,8 @@ static int physmap_flash_probe(struct platform_device *dev) if (err) goto err_out; - err = parse_mtd_partitions(info->cmtd, part_probe_types, - &info->parts, 0); - if (err > 0) { - mtd_device_register(info->cmtd, info->parts, err); - info->nr_parts = err; - return 0; - } - - if (physmap_data->nr_parts) { - printk(KERN_NOTICE "Using physmap partition information\n"); - mtd_device_register(info->cmtd, physmap_data->parts, - physmap_data->nr_parts); - return 0; - } - - mtd_device_register(info->cmtd, NULL, 0); - + mtd_device_parse_register(info->cmtd, part_probe_types, 0, + physmap_data->parts, physmap_data->nr_parts); return 0; err_out: