diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-22 19:56:22 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-22 19:56:22 -0400 |
commit | ac1b7c378ef26fba6694d5f118fe7fc16fee2fe2 (patch) | |
tree | 3f72979545bb070eb2c3e903cbf31dc4aef3ffc9 /drivers/mtd/maps/bfin-async-flash.c | |
parent | 9e268beb92ee3a853b3946e84b10358207e2085f (diff) | |
parent | c90173f0907486fe4010c2a8cef534e2473db43f (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (63 commits)
mtd: OneNAND: Allow setting of boundary information when built as module
jffs2: leaking jffs2_summary in function jffs2_scan_medium
mtd: nand: Fix memory leak on txx9ndfmc probe failure.
mtd: orion_nand: use burst reads with double word accesses
mtd/nand: s3c6400 support for s3c2410 driver
[MTD] [NAND] S3C2410: Use DIV_ROUND_UP
[MTD] [NAND] S3C2410: Deal with unaligned lengths in S3C2440 buffer read/write
[MTD] [NAND] S3C2410: Allow the machine code to get the BBT table from NAND
[MTD] [NAND] S3C2410: Added a kerneldoc for s3c2410_nand_set
mtd: physmap_of: Add multiple regions and concatenation support
mtd: nand: max_retries off by one in mxc_nand
mtd: nand: s3c2410_nand_setrate(): use correct macros for 2412/2440
mtd: onenand: add bbt_wait & unlock_all as replaceable for some platform
mtd: Flex-OneNAND support
mtd: nand: add OMAP2/OMAP3 NAND driver
mtd: maps: Blackfin async: fix memory leaks in probe/remove funcs
mtd: uclinux: mark local stuff static
mtd: uclinux: do not allow to be built as a module
mtd: uclinux: allow systems to override map addr/size
mtd: blackfin NFC: fix hang when using NAND on BF527-EZKITs
...
Diffstat (limited to 'drivers/mtd/maps/bfin-async-flash.c')
-rw-r--r-- | drivers/mtd/maps/bfin-async-flash.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c index 576611f605db..365c77b1b871 100644 --- a/drivers/mtd/maps/bfin-async-flash.c +++ b/drivers/mtd/maps/bfin-async-flash.c | |||
@@ -40,6 +40,9 @@ struct async_state { | |||
40 | uint32_t flash_ambctl0, flash_ambctl1; | 40 | uint32_t flash_ambctl0, flash_ambctl1; |
41 | uint32_t save_ambctl0, save_ambctl1; | 41 | uint32_t save_ambctl0, save_ambctl1; |
42 | unsigned long irq_flags; | 42 | unsigned long irq_flags; |
43 | #ifdef CONFIG_MTD_PARTITIONS | ||
44 | struct mtd_partition *parts; | ||
45 | #endif | ||
43 | }; | 46 | }; |
44 | 47 | ||
45 | static void switch_to_flash(struct async_state *state) | 48 | static void switch_to_flash(struct async_state *state) |
@@ -170,6 +173,7 @@ static int __devinit bfin_flash_probe(struct platform_device *pdev) | |||
170 | if (ret > 0) { | 173 | if (ret > 0) { |
171 | pr_devinit(KERN_NOTICE DRIVER_NAME ": Using commandline partition definition\n"); | 174 | pr_devinit(KERN_NOTICE DRIVER_NAME ": Using commandline partition definition\n"); |
172 | add_mtd_partitions(state->mtd, pdata->parts, ret); | 175 | add_mtd_partitions(state->mtd, pdata->parts, ret); |
176 | state->parts = pdata->parts; | ||
173 | 177 | ||
174 | } else if (pdata->nr_parts) { | 178 | } else if (pdata->nr_parts) { |
175 | pr_devinit(KERN_NOTICE DRIVER_NAME ": Using board partition definition\n"); | 179 | pr_devinit(KERN_NOTICE DRIVER_NAME ": Using board partition definition\n"); |
@@ -193,6 +197,7 @@ static int __devexit bfin_flash_remove(struct platform_device *pdev) | |||
193 | gpio_free(state->enet_flash_pin); | 197 | gpio_free(state->enet_flash_pin); |
194 | #ifdef CONFIG_MTD_PARTITIONS | 198 | #ifdef CONFIG_MTD_PARTITIONS |
195 | del_mtd_partitions(state->mtd); | 199 | del_mtd_partitions(state->mtd); |
200 | kfree(state->parts); | ||
196 | #endif | 201 | #endif |
197 | map_destroy(state->mtd); | 202 | map_destroy(state->mtd); |
198 | kfree(state); | 203 | kfree(state); |