aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/devices/block2mtd.c1
-rw-r--r--drivers/mtd/devices/m25p80.c1
-rw-r--r--drivers/mtd/devices/sst25l.c1
-rw-r--r--drivers/mtd/lpddr/lpddr_cmds.c1
-rw-r--r--drivers/mtd/maps/amd76xrom.c1
-rw-r--r--drivers/mtd/maps/bfin-async-flash.c1
-rw-r--r--drivers/mtd/maps/ck804xrom.c1
-rw-r--r--drivers/mtd/maps/esb2rom.c1
-rw-r--r--drivers/mtd/maps/gpio-addr-flash.c1
-rw-r--r--drivers/mtd/maps/ichxrom.c1
-rw-r--r--drivers/mtd/maps/intel_vr_nor.c1
-rw-r--r--drivers/mtd/maps/octagon-5066.c1
-rw-r--r--drivers/mtd/maps/physmap_of.c1
-rw-r--r--drivers/mtd/maps/pismo.c1
-rw-r--r--drivers/mtd/maps/pmcmsp-flash.c1
-rw-r--r--drivers/mtd/maps/pxa2xx-flash.c1
-rw-r--r--drivers/mtd/maps/sbc_gxx.c1
-rw-r--r--drivers/mtd/maps/sun_uflash.c1
-rw-r--r--drivers/mtd/maps/vmax301.c1
-rw-r--r--drivers/mtd/maps/vmu-flash.c1
-rw-r--r--drivers/mtd/mtdcore.c1
-rw-r--r--drivers/mtd/nand/bcm_umi_nand.c1
-rw-r--r--drivers/mtd/nand/cafe_nand.c1
-rw-r--r--drivers/mtd/nand/cmx270_nand.c1
-rw-r--r--drivers/mtd/nand/davinci_nand.c1
-rw-r--r--drivers/mtd/nand/diskonchip.c1
-rw-r--r--drivers/mtd/nand/fsl_upm.c1
-rw-r--r--drivers/mtd/nand/ndfc.c1
-rw-r--r--drivers/mtd/nand/nomadik_nand.c1
-rw-r--r--drivers/mtd/nand/omap2.c1
-rw-r--r--drivers/mtd/nand/pxa3xx_nand.c1
-rw-r--r--drivers/mtd/nand/sh_flctl.c1
-rw-r--r--drivers/mtd/nand/tmio_nand.c1
-rw-r--r--drivers/mtd/ofpart.c1
-rw-r--r--drivers/mtd/onenand/omap2.c1
-rw-r--r--drivers/mtd/onenand/onenand_base.c1
-rw-r--r--drivers/mtd/onenand/onenand_sim.c1
-rw-r--r--drivers/mtd/tests/mtd_nandecctest.c1
-rw-r--r--drivers/mtd/tests/mtd_oobtest.c1
-rw-r--r--drivers/mtd/tests/mtd_pagetest.c1
-rw-r--r--drivers/mtd/tests/mtd_readtest.c1
-rw-r--r--drivers/mtd/tests/mtd_speedtest.c1
-rw-r--r--drivers/mtd/tests/mtd_stresstest.c1
-rw-r--r--drivers/mtd/tests/mtd_subpagetest.c1
-rw-r--r--drivers/mtd/tests/mtd_torturetest.c1
-rw-r--r--drivers/mtd/ubi/build.c1
-rw-r--r--drivers/mtd/ubi/cdev.c1
-rw-r--r--drivers/mtd/ubi/gluebi.c1
-rw-r--r--drivers/mtd/ubi/io.c1
-rw-r--r--drivers/mtd/ubi/kapi.c1
-rw-r--r--drivers/mtd/ubi/scan.c1
-rw-r--r--drivers/mtd/ubi/ubi.h1
-rw-r--r--drivers/mtd/ubi/vmt.c1
-rw-r--r--drivers/mtd/ubi/vtbl.c1
54 files changed, 49 insertions, 5 deletions
diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c
index 8c295f40d2ac..ce6424008ed9 100644
--- a/drivers/mtd/devices/block2mtd.c
+++ b/drivers/mtd/devices/block2mtd.c
@@ -17,6 +17,7 @@
17#include <linux/buffer_head.h> 17#include <linux/buffer_head.h>
18#include <linux/mutex.h> 18#include <linux/mutex.h>
19#include <linux/mount.h> 19#include <linux/mount.h>
20#include <linux/slab.h>
20 21
21#define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args) 22#define ERROR(fmt, args...) printk(KERN_ERR "block2mtd: " fmt "\n" , ## args)
22#define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args) 23#define INFO(fmt, args...) printk(KERN_INFO "block2mtd: " fmt "\n" , ## args)
diff --git a/drivers/mtd/devices/m25p80.c b/drivers/mtd/devices/m25p80.c
index f3f4768d6e18..81e49a9b017e 100644
--- a/drivers/mtd/devices/m25p80.c
+++ b/drivers/mtd/devices/m25p80.c
@@ -21,6 +21,7 @@
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/mutex.h> 22#include <linux/mutex.h>
23#include <linux/math64.h> 23#include <linux/math64.h>
24#include <linux/slab.h>
24#include <linux/sched.h> 25#include <linux/sched.h>
25#include <linux/mod_devicetable.h> 26#include <linux/mod_devicetable.h>
26 27
diff --git a/drivers/mtd/devices/sst25l.c b/drivers/mtd/devices/sst25l.c
index 0a11721f146e..fe17054ee2fe 100644
--- a/drivers/mtd/devices/sst25l.c
+++ b/drivers/mtd/devices/sst25l.c
@@ -20,6 +20,7 @@
20#include <linux/device.h> 20#include <linux/device.h>
21#include <linux/mutex.h> 21#include <linux/mutex.h>
22#include <linux/interrupt.h> 22#include <linux/interrupt.h>
23#include <linux/slab.h>
23#include <linux/sched.h> 24#include <linux/sched.h>
24 25
25#include <linux/mtd/mtd.h> 26#include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/lpddr/lpddr_cmds.c b/drivers/mtd/lpddr/lpddr_cmds.c
index e22ca49583e7..a73ee12aad81 100644
--- a/drivers/mtd/lpddr/lpddr_cmds.c
+++ b/drivers/mtd/lpddr/lpddr_cmds.c
@@ -26,6 +26,7 @@
26 */ 26 */
27#include <linux/mtd/pfow.h> 27#include <linux/mtd/pfow.h>
28#include <linux/mtd/qinfo.h> 28#include <linux/mtd/qinfo.h>
29#include <linux/slab.h>
29 30
30static int lpddr_read(struct mtd_info *mtd, loff_t adr, size_t len, 31static int lpddr_read(struct mtd_info *mtd, loff_t adr, size_t len,
31 size_t *retlen, u_char *buf); 32 size_t *retlen, u_char *buf);
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c
index 237733d094c4..19fe92db0c46 100644
--- a/drivers/mtd/maps/amd76xrom.c
+++ b/drivers/mtd/maps/amd76xrom.c
@@ -8,6 +8,7 @@
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/slab.h>
11#include <asm/io.h> 12#include <asm/io.h>
12#include <linux/mtd/mtd.h> 13#include <linux/mtd/mtd.h>
13#include <linux/mtd/map.h> 14#include <linux/mtd/map.h>
diff --git a/drivers/mtd/maps/bfin-async-flash.c b/drivers/mtd/maps/bfin-async-flash.c
index a7c808b577d3..c0fd99b0c525 100644
--- a/drivers/mtd/maps/bfin-async-flash.c
+++ b/drivers/mtd/maps/bfin-async-flash.c
@@ -22,6 +22,7 @@
22#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
23#include <linux/mtd/physmap.h> 23#include <linux/mtd/physmap.h>
24#include <linux/platform_device.h> 24#include <linux/platform_device.h>
25#include <linux/slab.h>
25#include <linux/types.h> 26#include <linux/types.h>
26 27
27#include <asm/blackfin.h> 28#include <asm/blackfin.h>
diff --git a/drivers/mtd/maps/ck804xrom.c b/drivers/mtd/maps/ck804xrom.c
index 424f17d6ffd1..ddb462bea9b5 100644
--- a/drivers/mtd/maps/ck804xrom.c
+++ b/drivers/mtd/maps/ck804xrom.c
@@ -11,6 +11,7 @@
11#include <linux/types.h> 11#include <linux/types.h>
12#include <linux/kernel.h> 12#include <linux/kernel.h>
13#include <linux/init.h> 13#include <linux/init.h>
14#include <linux/slab.h>
14#include <asm/io.h> 15#include <asm/io.h>
15#include <linux/mtd/mtd.h> 16#include <linux/mtd/mtd.h>
16#include <linux/mtd/map.h> 17#include <linux/mtd/map.h>
diff --git a/drivers/mtd/maps/esb2rom.c b/drivers/mtd/maps/esb2rom.c
index 11a2f57df9cf..d12c93dc1aad 100644
--- a/drivers/mtd/maps/esb2rom.c
+++ b/drivers/mtd/maps/esb2rom.c
@@ -14,6 +14,7 @@
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/kernel.h> 15#include <linux/kernel.h>
16#include <linux/init.h> 16#include <linux/init.h>
17#include <linux/slab.h>
17#include <asm/io.h> 18#include <asm/io.h>
18#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
19#include <linux/mtd/map.h> 20#include <linux/mtd/map.h>
diff --git a/drivers/mtd/maps/gpio-addr-flash.c b/drivers/mtd/maps/gpio-addr-flash.c
index 1ad5caf9fe69..32e89d773b4e 100644
--- a/drivers/mtd/maps/gpio-addr-flash.c
+++ b/drivers/mtd/maps/gpio-addr-flash.c
@@ -23,6 +23,7 @@
23#include <linux/mtd/partitions.h> 23#include <linux/mtd/partitions.h>
24#include <linux/mtd/physmap.h> 24#include <linux/mtd/physmap.h>
25#include <linux/platform_device.h> 25#include <linux/platform_device.h>
26#include <linux/slab.h>
26#include <linux/types.h> 27#include <linux/types.h>
27 28
28#define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); }) 29#define pr_devinit(fmt, args...) ({ static const __devinitconst char __fmt[] = fmt; printk(__fmt, ## args); })
diff --git a/drivers/mtd/maps/ichxrom.c b/drivers/mtd/maps/ichxrom.c
index c32bc28920b3..f102bf243a74 100644
--- a/drivers/mtd/maps/ichxrom.c
+++ b/drivers/mtd/maps/ichxrom.c
@@ -8,6 +8,7 @@
8#include <linux/types.h> 8#include <linux/types.h>
9#include <linux/kernel.h> 9#include <linux/kernel.h>
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/slab.h>
11#include <asm/io.h> 12#include <asm/io.h>
12#include <linux/mtd/mtd.h> 13#include <linux/mtd/mtd.h>
13#include <linux/mtd/map.h> 14#include <linux/mtd/map.h>
diff --git a/drivers/mtd/maps/intel_vr_nor.c b/drivers/mtd/maps/intel_vr_nor.c
index 1e7814ae212a..fc1998512eb4 100644
--- a/drivers/mtd/maps/intel_vr_nor.c
+++ b/drivers/mtd/maps/intel_vr_nor.c
@@ -29,6 +29,7 @@
29 29
30#include <linux/module.h> 30#include <linux/module.h>
31#include <linux/kernel.h> 31#include <linux/kernel.h>
32#include <linux/slab.h>
32#include <linux/pci.h> 33#include <linux/pci.h>
33#include <linux/init.h> 34#include <linux/init.h>
34#include <linux/mtd/mtd.h> 35#include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/maps/octagon-5066.c b/drivers/mtd/maps/octagon-5066.c
index 2b2e45093218..23fe1786770f 100644
--- a/drivers/mtd/maps/octagon-5066.c
+++ b/drivers/mtd/maps/octagon-5066.c
@@ -24,7 +24,6 @@
24 ##################################################################### */ 24 ##################################################################### */
25 25
26#include <linux/module.h> 26#include <linux/module.h>
27#include <linux/slab.h>
28#include <linux/ioport.h> 27#include <linux/ioport.h>
29#include <linux/init.h> 28#include <linux/init.h>
30#include <asm/io.h> 29#include <asm/io.h>
diff --git a/drivers/mtd/maps/physmap_of.c b/drivers/mtd/maps/physmap_of.c
index 61e4eb48bb2d..101ee6ead05c 100644
--- a/drivers/mtd/maps/physmap_of.c
+++ b/drivers/mtd/maps/physmap_of.c
@@ -23,6 +23,7 @@
23#include <linux/mtd/concat.h> 23#include <linux/mtd/concat.h>
24#include <linux/of.h> 24#include <linux/of.h>
25#include <linux/of_platform.h> 25#include <linux/of_platform.h>
26#include <linux/slab.h>
26 27
27struct of_flash_list { 28struct of_flash_list {
28 struct mtd_info *mtd; 29 struct mtd_info *mtd;
diff --git a/drivers/mtd/maps/pismo.c b/drivers/mtd/maps/pismo.c
index 30e12c88d1da..60c068db452d 100644
--- a/drivers/mtd/maps/pismo.c
+++ b/drivers/mtd/maps/pismo.c
@@ -10,6 +10,7 @@
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/module.h> 11#include <linux/module.h>
12#include <linux/i2c.h> 12#include <linux/i2c.h>
13#include <linux/slab.h>
13#include <linux/platform_device.h> 14#include <linux/platform_device.h>
14#include <linux/spinlock.h> 15#include <linux/spinlock.h>
15#include <linux/mutex.h> 16#include <linux/mutex.h>
diff --git a/drivers/mtd/maps/pmcmsp-flash.c b/drivers/mtd/maps/pmcmsp-flash.c
index c8fd8da4bc87..acb13fa5001c 100644
--- a/drivers/mtd/maps/pmcmsp-flash.c
+++ b/drivers/mtd/maps/pmcmsp-flash.c
@@ -28,6 +28,7 @@
28 * 675 Mass Ave, Cambridge, MA 02139, USA. 28 * 675 Mass Ave, Cambridge, MA 02139, USA.
29 */ 29 */
30 30
31#include <linux/slab.h>
31#include <linux/module.h> 32#include <linux/module.h>
32#include <linux/types.h> 33#include <linux/types.h>
33#include <linux/kernel.h> 34#include <linux/kernel.h>
diff --git a/drivers/mtd/maps/pxa2xx-flash.c b/drivers/mtd/maps/pxa2xx-flash.c
index b13f6417b5b2..91dc6331053f 100644
--- a/drivers/mtd/maps/pxa2xx-flash.c
+++ b/drivers/mtd/maps/pxa2xx-flash.c
@@ -11,6 +11,7 @@
11 11
12#include <linux/module.h> 12#include <linux/module.h>
13#include <linux/types.h> 13#include <linux/types.h>
14#include <linux/slab.h>
14#include <linux/kernel.h> 15#include <linux/kernel.h>
15#include <linux/init.h> 16#include <linux/init.h>
16#include <linux/platform_device.h> 17#include <linux/platform_device.h>
diff --git a/drivers/mtd/maps/sbc_gxx.c b/drivers/mtd/maps/sbc_gxx.c
index 1b1c0b7e11ef..04b2781fc627 100644
--- a/drivers/mtd/maps/sbc_gxx.c
+++ b/drivers/mtd/maps/sbc_gxx.c
@@ -45,7 +45,6 @@ separate MTD devices.
45// Includes 45// Includes
46 46
47#include <linux/module.h> 47#include <linux/module.h>
48#include <linux/slab.h>
49#include <linux/ioport.h> 48#include <linux/ioport.h>
50#include <linux/init.h> 49#include <linux/init.h>
51#include <asm/io.h> 50#include <asm/io.h>
diff --git a/drivers/mtd/maps/sun_uflash.c b/drivers/mtd/maps/sun_uflash.c
index fd7a1017399a..fadc4c45b455 100644
--- a/drivers/mtd/maps/sun_uflash.c
+++ b/drivers/mtd/maps/sun_uflash.c
@@ -15,6 +15,7 @@
15#include <linux/ioport.h> 15#include <linux/ioport.h>
16#include <linux/of.h> 16#include <linux/of.h>
17#include <linux/of_device.h> 17#include <linux/of_device.h>
18#include <linux/slab.h>
18#include <asm/prom.h> 19#include <asm/prom.h>
19#include <asm/uaccess.h> 20#include <asm/uaccess.h>
20#include <asm/io.h> 21#include <asm/io.h>
diff --git a/drivers/mtd/maps/vmax301.c b/drivers/mtd/maps/vmax301.c
index 6d452dcdfe34..6adaa6acc193 100644
--- a/drivers/mtd/maps/vmax301.c
+++ b/drivers/mtd/maps/vmax301.c
@@ -16,7 +16,6 @@
16 ##################################################################### */ 16 ##################################################################### */
17 17
18#include <linux/module.h> 18#include <linux/module.h>
19#include <linux/slab.h>
20#include <linux/ioport.h> 19#include <linux/ioport.h>
21#include <linux/init.h> 20#include <linux/init.h>
22#include <linux/spinlock.h> 21#include <linux/spinlock.h>
diff --git a/drivers/mtd/maps/vmu-flash.c b/drivers/mtd/maps/vmu-flash.c
index 82afad0ddd72..4afc167731ef 100644
--- a/drivers/mtd/maps/vmu-flash.c
+++ b/drivers/mtd/maps/vmu-flash.c
@@ -8,6 +8,7 @@
8 * GNU General Public Licence 8 * GNU General Public Licence
9 */ 9 */
10#include <linux/init.h> 10#include <linux/init.h>
11#include <linux/slab.h>
11#include <linux/sched.h> 12#include <linux/sched.h>
12#include <linux/delay.h> 13#include <linux/delay.h>
13#include <linux/maple.h> 14#include <linux/maple.h>
diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
index c356c0a30c3e..5b38b17d2229 100644
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@ -7,7 +7,6 @@
7#include <linux/module.h> 7#include <linux/module.h>
8#include <linux/kernel.h> 8#include <linux/kernel.h>
9#include <linux/ptrace.h> 9#include <linux/ptrace.h>
10#include <linux/slab.h>
11#include <linux/string.h> 10#include <linux/string.h>
12#include <linux/timer.h> 11#include <linux/timer.h>
13#include <linux/major.h> 12#include <linux/major.h>
diff --git a/drivers/mtd/nand/bcm_umi_nand.c b/drivers/mtd/nand/bcm_umi_nand.c
index 7d1cca7a31a9..c997f98eeb3d 100644
--- a/drivers/mtd/nand/bcm_umi_nand.c
+++ b/drivers/mtd/nand/bcm_umi_nand.c
@@ -18,6 +18,7 @@
18#include <linux/types.h> 18#include <linux/types.h>
19#include <linux/init.h> 19#include <linux/init.h>
20#include <linux/kernel.h> 20#include <linux/kernel.h>
21#include <linux/slab.h>
21#include <linux/string.h> 22#include <linux/string.h>
22#include <linux/ioport.h> 23#include <linux/ioport.h>
23#include <linux/device.h> 24#include <linux/device.h>
diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c
index c828d9ac7bd7..e5a9f9ccea60 100644
--- a/drivers/mtd/nand/cafe_nand.c
+++ b/drivers/mtd/nand/cafe_nand.c
@@ -20,6 +20,7 @@
20#include <linux/delay.h> 20#include <linux/delay.h>
21#include <linux/interrupt.h> 21#include <linux/interrupt.h>
22#include <linux/dma-mapping.h> 22#include <linux/dma-mapping.h>
23#include <linux/slab.h>
23#include <asm/io.h> 24#include <asm/io.h>
24 25
25#define CAFE_NAND_CTRL1 0x00 26#define CAFE_NAND_CTRL1 0x00
diff --git a/drivers/mtd/nand/cmx270_nand.c b/drivers/mtd/nand/cmx270_nand.c
index 826cacffcefc..6e6495278258 100644
--- a/drivers/mtd/nand/cmx270_nand.c
+++ b/drivers/mtd/nand/cmx270_nand.c
@@ -20,6 +20,7 @@
20 20
21#include <linux/mtd/nand.h> 21#include <linux/mtd/nand.h>
22#include <linux/mtd/partitions.h> 22#include <linux/mtd/partitions.h>
23#include <linux/slab.h>
23#include <linux/gpio.h> 24#include <linux/gpio.h>
24 25
25#include <asm/io.h> 26#include <asm/io.h>
diff --git a/drivers/mtd/nand/davinci_nand.c b/drivers/mtd/nand/davinci_nand.c
index fe3eba87de40..76e2dc8e62f7 100644
--- a/drivers/mtd/nand/davinci_nand.c
+++ b/drivers/mtd/nand/davinci_nand.c
@@ -32,6 +32,7 @@
32#include <linux/io.h> 32#include <linux/io.h>
33#include <linux/mtd/nand.h> 33#include <linux/mtd/nand.h>
34#include <linux/mtd/partitions.h> 34#include <linux/mtd/partitions.h>
35#include <linux/slab.h>
35 36
36#include <mach/nand.h> 37#include <mach/nand.h>
37 38
diff --git a/drivers/mtd/nand/diskonchip.c b/drivers/mtd/nand/diskonchip.c
index b126cf887476..47067bc98248 100644
--- a/drivers/mtd/nand/diskonchip.c
+++ b/drivers/mtd/nand/diskonchip.c
@@ -23,6 +23,7 @@
23#include <linux/delay.h> 23#include <linux/delay.h>
24#include <linux/rslib.h> 24#include <linux/rslib.h>
25#include <linux/moduleparam.h> 25#include <linux/moduleparam.h>
26#include <linux/slab.h>
26#include <asm/io.h> 27#include <asm/io.h>
27 28
28#include <linux/mtd/mtd.h> 29#include <linux/mtd/mtd.h>
diff --git a/drivers/mtd/nand/fsl_upm.c b/drivers/mtd/nand/fsl_upm.c
index 071a60cb4204..4b96296af321 100644
--- a/drivers/mtd/nand/fsl_upm.c
+++ b/drivers/mtd/nand/fsl_upm.c
@@ -21,6 +21,7 @@
21#include <linux/of_platform.h> 21#include <linux/of_platform.h>
22#include <linux/of_gpio.h> 22#include <linux/of_gpio.h>
23#include <linux/io.h> 23#include <linux/io.h>
24#include <linux/slab.h>
24#include <asm/fsl_lbc.h> 25#include <asm/fsl_lbc.h>
25 26
26#define FSL_UPM_WAIT_RUN_PATTERN 0x1 27#define FSL_UPM_WAIT_RUN_PATTERN 0x1
diff --git a/drivers/mtd/nand/ndfc.c b/drivers/mtd/nand/ndfc.c
index 40b5658bdbe6..b983cae8c298 100644
--- a/drivers/mtd/nand/ndfc.c
+++ b/drivers/mtd/nand/ndfc.c
@@ -28,6 +28,7 @@
28#include <linux/mtd/nand_ecc.h> 28#include <linux/mtd/nand_ecc.h>
29#include <linux/mtd/partitions.h> 29#include <linux/mtd/partitions.h>
30#include <linux/mtd/ndfc.h> 30#include <linux/mtd/ndfc.h>
31#include <linux/slab.h>
31#include <linux/mtd/mtd.h> 32#include <linux/mtd/mtd.h>
32#include <linux/of_platform.h> 33#include <linux/of_platform.h>
33#include <asm/io.h> 34#include <asm/io.h>
diff --git a/drivers/mtd/nand/nomadik_nand.c b/drivers/mtd/nand/nomadik_nand.c
index 66123419f65d..1f6f741af5da 100644
--- a/drivers/mtd/nand/nomadik_nand.c
+++ b/drivers/mtd/nand/nomadik_nand.c
@@ -30,6 +30,7 @@
30#include <linux/platform_device.h> 30#include <linux/platform_device.h>
31#include <linux/mtd/partitions.h> 31#include <linux/mtd/partitions.h>
32#include <linux/io.h> 32#include <linux/io.h>
33#include <linux/slab.h>
33#include <mach/nand.h> 34#include <mach/nand.h>
34#include <mach/fsmc.h> 35#include <mach/fsmc.h>
35 36
diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 26aec0080184..7545568fce47 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -17,6 +17,7 @@
17#include <linux/mtd/nand.h> 17#include <linux/mtd/nand.h>
18#include <linux/mtd/partitions.h> 18#include <linux/mtd/partitions.h>
19#include <linux/io.h> 19#include <linux/io.h>
20#include <linux/slab.h>
20 21
21#include <plat/dma.h> 22#include <plat/dma.h>
22#include <plat/gpmc.h> 23#include <plat/gpmc.h>
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c
index 1a5a0365c983..5d55152162cf 100644
--- a/drivers/mtd/nand/pxa3xx_nand.c
+++ b/drivers/mtd/nand/pxa3xx_nand.c
@@ -21,6 +21,7 @@
21#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
22#include <linux/io.h> 22#include <linux/io.h>
23#include <linux/irq.h> 23#include <linux/irq.h>
24#include <linux/slab.h>
24 25
25#include <mach/dma.h> 26#include <mach/dma.h>
26#include <plat/pxa3xx_nand.h> 27#include <plat/pxa3xx_nand.h>
diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c
index 1842df8bdd93..34752fce0793 100644
--- a/drivers/mtd/nand/sh_flctl.c
+++ b/drivers/mtd/nand/sh_flctl.c
@@ -26,6 +26,7 @@
26#include <linux/delay.h> 26#include <linux/delay.h>
27#include <linux/io.h> 27#include <linux/io.h>
28#include <linux/platform_device.h> 28#include <linux/platform_device.h>
29#include <linux/slab.h>
29 30
30#include <linux/mtd/mtd.h> 31#include <linux/mtd/mtd.h>
31#include <linux/mtd/nand.h> 32#include <linux/mtd/nand.h>
diff --git a/drivers/mtd/nand/tmio_nand.c b/drivers/mtd/nand/tmio_nand.c
index 92c73344a669..fa28f01ae009 100644
--- a/drivers/mtd/nand/tmio_nand.c
+++ b/drivers/mtd/nand/tmio_nand.c
@@ -37,6 +37,7 @@
37#include <linux/mtd/nand.h> 37#include <linux/mtd/nand.h>
38#include <linux/mtd/nand_ecc.h> 38#include <linux/mtd/nand_ecc.h>
39#include <linux/mtd/partitions.h> 39#include <linux/mtd/partitions.h>
40#include <linux/slab.h>
40 41
41/*--------------------------------------------------------------------------*/ 42/*--------------------------------------------------------------------------*/
42 43
diff --git a/drivers/mtd/ofpart.c b/drivers/mtd/ofpart.c
index 62d6a78c4eee..4f0d635674f3 100644
--- a/drivers/mtd/ofpart.c
+++ b/drivers/mtd/ofpart.c
@@ -17,6 +17,7 @@
17#include <linux/init.h> 17#include <linux/init.h>
18#include <linux/of.h> 18#include <linux/of.h>
19#include <linux/mtd/mtd.h> 19#include <linux/mtd/mtd.h>
20#include <linux/slab.h>
20#include <linux/mtd/partitions.h> 21#include <linux/mtd/partitions.h>
21 22
22int __devinit of_mtd_parse_partitions(struct device *dev, 23int __devinit of_mtd_parse_partitions(struct device *dev,
diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c
index 75f38b95811e..fd406348fdfd 100644
--- a/drivers/mtd/onenand/omap2.c
+++ b/drivers/mtd/onenand/omap2.c
@@ -34,6 +34,7 @@
34#include <linux/delay.h> 34#include <linux/delay.h>
35#include <linux/dma-mapping.h> 35#include <linux/dma-mapping.h>
36#include <linux/io.h> 36#include <linux/io.h>
37#include <linux/slab.h>
37 38
38#include <asm/mach/flash.h> 39#include <asm/mach/flash.h>
39#include <plat/gpmc.h> 40#include <plat/gpmc.h>
diff --git a/drivers/mtd/onenand/onenand_base.c b/drivers/mtd/onenand/onenand_base.c
index f63b1db3ffb3..32f0ed33afe0 100644
--- a/drivers/mtd/onenand/onenand_base.c
+++ b/drivers/mtd/onenand/onenand_base.c
@@ -23,6 +23,7 @@
23#include <linux/kernel.h> 23#include <linux/kernel.h>
24#include <linux/module.h> 24#include <linux/module.h>
25#include <linux/moduleparam.h> 25#include <linux/moduleparam.h>
26#include <linux/slab.h>
26#include <linux/init.h> 27#include <linux/init.h>
27#include <linux/sched.h> 28#include <linux/sched.h>
28#include <linux/delay.h> 29#include <linux/delay.h>
diff --git a/drivers/mtd/onenand/onenand_sim.c b/drivers/mtd/onenand/onenand_sim.c
index f6e3c8aebd3a..8b246061d511 100644
--- a/drivers/mtd/onenand/onenand_sim.c
+++ b/drivers/mtd/onenand/onenand_sim.c
@@ -16,6 +16,7 @@
16 */ 16 */
17 17
18#include <linux/kernel.h> 18#include <linux/kernel.h>
19#include <linux/slab.h>
19#include <linux/module.h> 20#include <linux/module.h>
20#include <linux/init.h> 21#include <linux/init.h>
21#include <linux/vmalloc.h> 22#include <linux/vmalloc.h>
diff --git a/drivers/mtd/tests/mtd_nandecctest.c b/drivers/mtd/tests/mtd_nandecctest.c
index c1f31051784c..70d6d7d0d656 100644
--- a/drivers/mtd/tests/mtd_nandecctest.c
+++ b/drivers/mtd/tests/mtd_nandecctest.c
@@ -1,7 +1,6 @@
1#include <linux/kernel.h> 1#include <linux/kernel.h>
2#include <linux/module.h> 2#include <linux/module.h>
3#include <linux/list.h> 3#include <linux/list.h>
4#include <linux/slab.h>
5#include <linux/random.h> 4#include <linux/random.h>
6#include <linux/string.h> 5#include <linux/string.h>
7#include <linux/bitops.h> 6#include <linux/bitops.h>
diff --git a/drivers/mtd/tests/mtd_oobtest.c b/drivers/mtd/tests/mtd_oobtest.c
index 5813920e79a5..dec92ae6111a 100644
--- a/drivers/mtd/tests/mtd_oobtest.c
+++ b/drivers/mtd/tests/mtd_oobtest.c
@@ -25,6 +25,7 @@
25#include <linux/moduleparam.h> 25#include <linux/moduleparam.h>
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/mtd/mtd.h> 27#include <linux/mtd/mtd.h>
28#include <linux/slab.h>
28#include <linux/sched.h> 29#include <linux/sched.h>
29 30
30#define PRINT_PREF KERN_INFO "mtd_oobtest: " 31#define PRINT_PREF KERN_INFO "mtd_oobtest: "
diff --git a/drivers/mtd/tests/mtd_pagetest.c b/drivers/mtd/tests/mtd_pagetest.c
index ce17cbe918c5..921a85df9196 100644
--- a/drivers/mtd/tests/mtd_pagetest.c
+++ b/drivers/mtd/tests/mtd_pagetest.c
@@ -25,6 +25,7 @@
25#include <linux/moduleparam.h> 25#include <linux/moduleparam.h>
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/mtd/mtd.h> 27#include <linux/mtd/mtd.h>
28#include <linux/slab.h>
28#include <linux/sched.h> 29#include <linux/sched.h>
29 30
30#define PRINT_PREF KERN_INFO "mtd_pagetest: " 31#define PRINT_PREF KERN_INFO "mtd_pagetest: "
diff --git a/drivers/mtd/tests/mtd_readtest.c b/drivers/mtd/tests/mtd_readtest.c
index 25c5dd03a837..7107fccbc7de 100644
--- a/drivers/mtd/tests/mtd_readtest.c
+++ b/drivers/mtd/tests/mtd_readtest.c
@@ -24,6 +24,7 @@
24#include <linux/moduleparam.h> 24#include <linux/moduleparam.h>
25#include <linux/err.h> 25#include <linux/err.h>
26#include <linux/mtd/mtd.h> 26#include <linux/mtd/mtd.h>
27#include <linux/slab.h>
27#include <linux/sched.h> 28#include <linux/sched.h>
28 29
29#define PRINT_PREF KERN_INFO "mtd_readtest: " 30#define PRINT_PREF KERN_INFO "mtd_readtest: "
diff --git a/drivers/mtd/tests/mtd_speedtest.c b/drivers/mtd/tests/mtd_speedtest.c
index 7fbb51d4eabe..56ca62bb96bf 100644
--- a/drivers/mtd/tests/mtd_speedtest.c
+++ b/drivers/mtd/tests/mtd_speedtest.c
@@ -24,6 +24,7 @@
24#include <linux/moduleparam.h> 24#include <linux/moduleparam.h>
25#include <linux/err.h> 25#include <linux/err.h>
26#include <linux/mtd/mtd.h> 26#include <linux/mtd/mtd.h>
27#include <linux/slab.h>
27#include <linux/sched.h> 28#include <linux/sched.h>
28 29
29#define PRINT_PREF KERN_INFO "mtd_speedtest: " 30#define PRINT_PREF KERN_INFO "mtd_speedtest: "
diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c
index a99d3cd737d8..3854afec56d0 100644
--- a/drivers/mtd/tests/mtd_stresstest.c
+++ b/drivers/mtd/tests/mtd_stresstest.c
@@ -24,6 +24,7 @@
24#include <linux/moduleparam.h> 24#include <linux/moduleparam.h>
25#include <linux/err.h> 25#include <linux/err.h>
26#include <linux/mtd/mtd.h> 26#include <linux/mtd/mtd.h>
27#include <linux/slab.h>
27#include <linux/sched.h> 28#include <linux/sched.h>
28#include <linux/vmalloc.h> 29#include <linux/vmalloc.h>
29 30
diff --git a/drivers/mtd/tests/mtd_subpagetest.c b/drivers/mtd/tests/mtd_subpagetest.c
index 5b889724268e..700237a3d120 100644
--- a/drivers/mtd/tests/mtd_subpagetest.c
+++ b/drivers/mtd/tests/mtd_subpagetest.c
@@ -24,6 +24,7 @@
24#include <linux/moduleparam.h> 24#include <linux/moduleparam.h>
25#include <linux/err.h> 25#include <linux/err.h>
26#include <linux/mtd/mtd.h> 26#include <linux/mtd/mtd.h>
27#include <linux/slab.h>
27#include <linux/sched.h> 28#include <linux/sched.h>
28 29
29#define PRINT_PREF KERN_INFO "mtd_subpagetest: " 30#define PRINT_PREF KERN_INFO "mtd_subpagetest: "
diff --git a/drivers/mtd/tests/mtd_torturetest.c b/drivers/mtd/tests/mtd_torturetest.c
index 631a0ab3a33c..5c6c3d248901 100644
--- a/drivers/mtd/tests/mtd_torturetest.c
+++ b/drivers/mtd/tests/mtd_torturetest.c
@@ -28,6 +28,7 @@
28#include <linux/moduleparam.h> 28#include <linux/moduleparam.h>
29#include <linux/err.h> 29#include <linux/err.h>
30#include <linux/mtd/mtd.h> 30#include <linux/mtd/mtd.h>
31#include <linux/slab.h>
31#include <linux/sched.h> 32#include <linux/sched.h>
32 33
33#define PRINT_PREF KERN_INFO "mtd_torturetest: " 34#define PRINT_PREF KERN_INFO "mtd_torturetest: "
diff --git a/drivers/mtd/ubi/build.c b/drivers/mtd/ubi/build.c
index fad40aa6f099..55c726dde942 100644
--- a/drivers/mtd/ubi/build.c
+++ b/drivers/mtd/ubi/build.c
@@ -44,6 +44,7 @@
44#include <linux/kthread.h> 44#include <linux/kthread.h>
45#include <linux/reboot.h> 45#include <linux/reboot.h>
46#include <linux/kernel.h> 46#include <linux/kernel.h>
47#include <linux/slab.h>
47#include "ubi.h" 48#include "ubi.h"
48 49
49/* Maximum length of the 'mtd=' parameter */ 50/* Maximum length of the 'mtd=' parameter */
diff --git a/drivers/mtd/ubi/cdev.c b/drivers/mtd/ubi/cdev.c
index 111ea41c4ecd..72ebb3f06b86 100644
--- a/drivers/mtd/ubi/cdev.c
+++ b/drivers/mtd/ubi/cdev.c
@@ -37,6 +37,7 @@
37 37
38#include <linux/module.h> 38#include <linux/module.h>
39#include <linux/stat.h> 39#include <linux/stat.h>
40#include <linux/slab.h>
40#include <linux/ioctl.h> 41#include <linux/ioctl.h>
41#include <linux/capability.h> 42#include <linux/capability.h>
42#include <linux/uaccess.h> 43#include <linux/uaccess.h>
diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c
index b5e478fa2661..9aa81584c8a2 100644
--- a/drivers/mtd/ubi/gluebi.c
+++ b/drivers/mtd/ubi/gluebi.c
@@ -31,6 +31,7 @@
31 31
32#include <linux/err.h> 32#include <linux/err.h>
33#include <linux/list.h> 33#include <linux/list.h>
34#include <linux/slab.h>
34#include <linux/sched.h> 35#include <linux/sched.h>
35#include <linux/math64.h> 36#include <linux/math64.h>
36#include <linux/module.h> 37#include <linux/module.h>
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index b4ecc84c7549..533b1a4b9af1 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -88,6 +88,7 @@
88 88
89#include <linux/crc32.h> 89#include <linux/crc32.h>
90#include <linux/err.h> 90#include <linux/err.h>
91#include <linux/slab.h>
91#include "ubi.h" 92#include "ubi.h"
92 93
93#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID 94#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID
diff --git a/drivers/mtd/ubi/kapi.c b/drivers/mtd/ubi/kapi.c
index 1361574e2b00..17f287decc36 100644
--- a/drivers/mtd/ubi/kapi.c
+++ b/drivers/mtd/ubi/kapi.c
@@ -22,6 +22,7 @@
22 22
23#include <linux/module.h> 23#include <linux/module.h>
24#include <linux/err.h> 24#include <linux/err.h>
25#include <linux/slab.h>
25#include <linux/namei.h> 26#include <linux/namei.h>
26#include <linux/fs.h> 27#include <linux/fs.h>
27#include <asm/div64.h> 28#include <asm/div64.h>
diff --git a/drivers/mtd/ubi/scan.c b/drivers/mtd/ubi/scan.c
index 594184bbd56a..dc5f688699da 100644
--- a/drivers/mtd/ubi/scan.c
+++ b/drivers/mtd/ubi/scan.c
@@ -41,6 +41,7 @@
41 */ 41 */
42 42
43#include <linux/err.h> 43#include <linux/err.h>
44#include <linux/slab.h>
44#include <linux/crc32.h> 45#include <linux/crc32.h>
45#include <linux/math64.h> 46#include <linux/math64.h>
46#include "ubi.h" 47#include "ubi.h"
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 1af08178defd..5176d4886518 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -34,6 +34,7 @@
34#include <linux/fs.h> 34#include <linux/fs.h>
35#include <linux/cdev.h> 35#include <linux/cdev.h>
36#include <linux/device.h> 36#include <linux/device.h>
37#include <linux/slab.h>
37#include <linux/string.h> 38#include <linux/string.h>
38#include <linux/vmalloc.h> 39#include <linux/vmalloc.h>
39#include <linux/notifier.h> 40#include <linux/notifier.h>
diff --git a/drivers/mtd/ubi/vmt.c b/drivers/mtd/ubi/vmt.c
index ab64cb56df6e..e42afab9a9fe 100644
--- a/drivers/mtd/ubi/vmt.c
+++ b/drivers/mtd/ubi/vmt.c
@@ -25,6 +25,7 @@
25 25
26#include <linux/err.h> 26#include <linux/err.h>
27#include <linux/math64.h> 27#include <linux/math64.h>
28#include <linux/slab.h>
28#include "ubi.h" 29#include "ubi.h"
29 30
30#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID 31#ifdef CONFIG_MTD_UBI_DEBUG_PARANOID
diff --git a/drivers/mtd/ubi/vtbl.c b/drivers/mtd/ubi/vtbl.c
index 40044028d682..cd90ff3b76b1 100644
--- a/drivers/mtd/ubi/vtbl.c
+++ b/drivers/mtd/ubi/vtbl.c
@@ -58,6 +58,7 @@
58 58
59#include <linux/crc32.h> 59#include <linux/crc32.h>
60#include <linux/err.h> 60#include <linux/err.h>
61#include <linux/slab.h>
61#include <asm/div64.h> 62#include <asm/div64.h>
62#include "ubi.h" 63#include "ubi.h"
63 64