aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-17 12:59:26 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-17 12:59:26 -0500
commitd6666be6f0c43efb9475d1d35fbef9f8be61b7b1 (patch)
treef544aec1dfdffa0c6b6d381f8e6710cad7e16074 /drivers/mtd/maps
parent0ea90b9e79cff66934119e6dd8fa8e9d0f7d005a (diff)
parent68f29815034e9dc9ed53cad85946c32b07adc8cc (diff)
Merge tag 'for-linus-20141215' of git://git.infradead.org/linux-mtd
Pull MTD updates from Brian Norris: "Summary: - Add device tree support for DoC3 - SPI NOR: Refactoring, for better layering between spi-nor.c and its driver users (e.g., m25p80.c) New flash device support Support 6-byte ID strings - NAND: New NAND driver for Allwinner SoC's (sunxi) GPMI NAND: add support for raw (no ECC) access, for testing purposes Add ATO manufacturer ID A few odd driver fixes - MTD tests: Allow testers to compensate for OOB bitflips in oobtest Fix a torturetest regression - nandsim: Support longer ID byte strings And more" * tag 'for-linus-20141215' of git://git.infradead.org/linux-mtd: (63 commits) mtd: tests: abort torturetest on erase errors mtd: physmap_of: fix potential NULL dereference mtd: spi-nor: allow NULL as chip name and try to auto detect it mtd: nand: gpmi: add raw oob access functions mtd: nand: gpmi: add proper raw access support mtd: nand: gpmi: add gpmi_copy_bits function mtd: spi-nor: factor out write_enable() for erase commands mtd: spi-nor: add support for s25fl128s mtd: spi-nor: remove the jedec_id/ext_id mtd: spi-nor: add id/id_len for flash_info{} mtd: nand: correct the comment of function nand_block_isreserved() jffs2: Drop bogus if in comment mtd: atmel_nand: replace memcpy32_toio/memcpy32_fromio with memcpy mtd: cafe_nand: drop duplicate .write_page implementation mtd: m25p80: Add support for serial flash Spansion S25FL132K MTD: m25p80: fix inconsistency in m25p_ids compared to spi_nor_ids mtd: spi-nor: improve wait-till-ready timeout loop mtd: delete unnecessary checks before two function calls mtd: nand: omap: Fix NAND enumeration on 3430 LDP mtd: nand: add ATO manufacturer info ...
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/bfin-async-flash.c1
-rw-r--r--drivers/mtd/maps/physmap_of.c8
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c
index 6ea51e549045..41730feeace8 100644
--- a/drivers/mtd/maps/bfin-async-flash.c
+++ b/drivers/mtd/maps/bfin-async-flash.c
@@ -126,7 +126,6 @@ static const char * const part_probe_types[] = {
126 126
127static int bfin_flash_probe(struct platform_device *pdev) 127static int bfin_flash_probe(struct platform_device *pdev)
128{ 128{
129 int ret;
130 struct physmap_flash_data *pdata = dev_get_platdata(&pdev->dev); 129 struct physmap_flash_data *pdata = dev_get_platdata(&pdev->dev);
131 struct resource *memory = platform_get_resource(pdev, IORESOURCE_MEM, 0); 130 struct resource *memory = platform_get_resource(pdev, IORESOURCE_MEM, 0);
132 struct resource *flash_ambctl = platform_get_resource(pdev, IORESOURCE_MEM, 1); 131 struct resource *flash_ambctl = platform_get_resource(pdev, IORESOURCE_MEM, 1);
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 991d0cb871f0..f35cd2081314 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -47,14 +47,12 @@ static int of_flash_remove(struct platform_device *dev)
47 return 0; 47 return 0;
48 dev_set_drvdata(&dev->dev, NULL); 48 dev_set_drvdata(&dev->dev, NULL);
49 49
50 if (info->cmtd != info->list[0].mtd) { 50 if (info->cmtd) {
51 mtd_device_unregister(info->cmtd); 51 mtd_device_unregister(info->cmtd);
52 mtd_concat_destroy(info->cmtd); 52 if (info->cmtd != info->list[0].mtd)
53 mtd_concat_destroy(info->cmtd);
53 } 54 }
54 55
55 if (info->cmtd)
56 mtd_device_unregister(info->cmtd);
57
58 for (i = 0; i < info->list_size; i++) { 56 for (i = 0; i < info->list_size; i++) {
59 if (info->list[i].mtd) 57 if (info->list[i].mtd)
60 map_destroy(info->list[i].mtd); 58 map_destroy(info->list[i].mtd);