diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/mtd/maps/physmap.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/mtd/maps/physmap.c')
-rw-r--r-- | drivers/mtd/maps/physmap.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c index 380648e9051a..d9603f7f9652 100644 --- a/drivers/mtd/maps/physmap.c +++ b/drivers/mtd/maps/physmap.c | |||
@@ -48,23 +48,22 @@ static int physmap_flash_remove(struct platform_device *dev) | |||
48 | 48 | ||
49 | if (info->cmtd) { | 49 | if (info->cmtd) { |
50 | #ifdef CONFIG_MTD_PARTITIONS | 50 | #ifdef CONFIG_MTD_PARTITIONS |
51 | if (info->nr_parts || physmap_data->nr_parts) | 51 | if (info->nr_parts || physmap_data->nr_parts) { |
52 | del_mtd_partitions(info->cmtd); | 52 | del_mtd_partitions(info->cmtd); |
53 | else | 53 | |
54 | if (info->nr_parts) | ||
55 | kfree(info->parts); | ||
56 | } else { | ||
54 | del_mtd_device(info->cmtd); | 57 | del_mtd_device(info->cmtd); |
58 | } | ||
55 | #else | 59 | #else |
56 | del_mtd_device(info->cmtd); | 60 | del_mtd_device(info->cmtd); |
57 | #endif | 61 | #endif |
58 | } | ||
59 | #ifdef CONFIG_MTD_PARTITIONS | ||
60 | if (info->nr_parts) | ||
61 | kfree(info->parts); | ||
62 | #endif | ||
63 | |||
64 | #ifdef CONFIG_MTD_CONCAT | 62 | #ifdef CONFIG_MTD_CONCAT |
65 | if (info->cmtd != info->mtd[0]) | 63 | if (info->cmtd != info->mtd[0]) |
66 | mtd_concat_destroy(info->cmtd); | 64 | mtd_concat_destroy(info->cmtd); |
67 | #endif | 65 | #endif |
66 | } | ||
68 | 67 | ||
69 | for (i = 0; i < MAX_RESOURCES; i++) { | 68 | for (i = 0; i < MAX_RESOURCES; i++) { |
70 | if (info->mtd[i] != NULL) | 69 | if (info->mtd[i] != NULL) |
@@ -130,7 +129,7 @@ static int physmap_flash_probe(struct platform_device *dev) | |||
130 | info->map[i].size); | 129 | info->map[i].size); |
131 | if (info->map[i].virt == NULL) { | 130 | if (info->map[i].virt == NULL) { |
132 | dev_err(&dev->dev, "Failed to ioremap flash region\n"); | 131 | dev_err(&dev->dev, "Failed to ioremap flash region\n"); |
133 | err = EIO; | 132 | err = -EIO; |
134 | goto err_out; | 133 | goto err_out; |
135 | } | 134 | } |
136 | 135 | ||