diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 13:23:43 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-16 13:23:43 -0500 |
commit | 60d9aa758c00f20ade0cb1951f6a934f628dd2d7 (patch) | |
tree | e3bdfa4ec0d3f9a29a822810b8b9188c7d613cbd /drivers/mtd/maps/physmap.c | |
parent | b2adf0cbec4cf0934c63f48f893e0cebde380d0c (diff) | |
parent | 2e16cfca6e17ae37ae21feca080a6f2eca9087dc (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (90 commits)
jffs2: Fix long-standing bug with symlink garbage collection.
mtd: OneNAND: Fix test of unsigned in onenand_otp_walk()
mtd: cfi_cmdset_0002, fix lock imbalance
Revert "mtd: move mxcnd_remove to .exit.text"
mtd: m25p80: add support for Macronix MX25L4005A
kmsg_dump: fix build for CONFIG_PRINTK=n
mtd: nandsim: add support for 4KiB pages
mtd: mtdoops: refactor as a kmsg_dumper
mtd: mtdoops: make record size configurable
mtd: mtdoops: limit the maximum mtd partition size
mtd: mtdoops: keep track of used/unused pages in an array
mtd: mtdoops: several minor cleanups
core: Add kernel message dumper to call on oopses and panics
mtd: add ARM pismo support
mtd: pxa3xx_nand: Fix PIO data transfer
mtd: nand: fix multi-chip suspend problem
mtd: add support for switching old SST chips into QRY mode
mtd: fix M29W800D dev_id and uaddr
mtd: don't use PF_MEMALLOC
mtd: Add bad block table overrides to Davinci NAND driver
...
Fixed up conflicts (mostly trivial) in
drivers/mtd/devices/m25p80.c
drivers/mtd/maps/pcmciamtd.c
drivers/mtd/nand/pxa3xx_nand.c
kernel/printk.c
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 | ||