diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 23:06:53 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-27 23:06:53 -0400 |
commit | 29a6ccca3869bbe33879dae0cd7df2a1559eff54 (patch) | |
tree | 2d9d355d8662ede95af7bc812d686dc4d5f37ff3 /arch | |
parent | 426048313dfa7d65dbd2379b1665755511f9544f (diff) | |
parent | 6a8a98b22b10f1560d5f90aded4a54234b9b2724 (diff) |
Merge git://git.infradead.org/mtd-2.6
* git://git.infradead.org/mtd-2.6: (97 commits)
mtd: kill CONFIG_MTD_PARTITIONS
mtd: remove add_mtd_partitions, add_mtd_device and friends
mtd: convert remaining users to mtd_device_register()
mtd: samsung onenand: convert to mtd_device_register()
mtd: omap2 onenand: convert to mtd_device_register()
mtd: txx9ndfmc: convert to mtd_device_register()
mtd: tmio_nand: convert to mtd_device_register()
mtd: socrates_nand: convert to mtd_device_register()
mtd: sharpsl: convert to mtd_device_register()
mtd: s3c2410 nand: convert to mtd_device_register()
mtd: ppchameleonevb: convert to mtd_device_register()
mtd: orion_nand: convert to mtd_device_register()
mtd: omap2: convert to mtd_device_register()
mtd: nomadik_nand: convert to mtd_device_register()
mtd: ndfc: convert to mtd_device_register()
mtd: mxc_nand: convert to mtd_device_register()
mtd: mpc5121_nfc: convert to mtd_device_register()
mtd: jz4740_nand: convert to mtd_device_register()
mtd: h1910: convert to mtd_device_register()
mtd: fsmc_nand: convert to mtd_device_register()
...
Fixed up trivial conflicts in
- drivers/mtd/maps/integrator-flash.c: removed in ARM tree
- drivers/mtd/maps/physmap.c: addition of afs partition probe type
clashing with removal of CONFIG_MTD_PARTITIONS
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-gemini/board-wbd111.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-gemini/board-wbd222.c | 7 | ||||
-rw-r--r-- | arch/arm/mach-ixp4xx/ixdp425-setup.c | 4 | ||||
-rw-r--r-- | arch/arm/mach-pxa/Kconfig | 1 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-amlm5900.c | 5 | ||||
-rw-r--r-- | arch/arm/mach-s3c2410/mach-tct_hammer.c | 6 | ||||
-rw-r--r-- | arch/blackfin/mach-bf537/boards/stamp.c | 4 | ||||
-rw-r--r-- | arch/blackfin/mach-bf561/boards/acvilon.c | 4 | ||||
-rw-r--r-- | arch/cris/Kconfig | 1 | ||||
-rw-r--r-- | arch/cris/arch-v10/drivers/axisflashmap.c | 10 | ||||
-rw-r--r-- | arch/cris/arch-v32/drivers/Kconfig | 1 | ||||
-rw-r--r-- | arch/cris/arch-v32/drivers/axisflashmap.c | 7 | ||||
-rw-r--r-- | arch/mips/cavium-octeon/flash_setup.c | 11 | ||||
-rw-r--r-- | arch/mips/txx9/generic/setup.c | 3 |
14 files changed, 14 insertions, 57 deletions
diff --git a/arch/arm/mach-gemini/board-wbd111.c b/arch/arm/mach-gemini/board-wbd111.c index af7b68a6b258..88cc422ee444 100644 --- a/arch/arm/mach-gemini/board-wbd111.c +++ b/arch/arm/mach-gemini/board-wbd111.c | |||
@@ -84,7 +84,6 @@ static struct sys_timer wbd111_timer = { | |||
84 | .init = gemini_timer_init, | 84 | .init = gemini_timer_init, |
85 | }; | 85 | }; |
86 | 86 | ||
87 | #ifdef CONFIG_MTD_PARTITIONS | ||
88 | static struct mtd_partition wbd111_partitions[] = { | 87 | static struct mtd_partition wbd111_partitions[] = { |
89 | { | 88 | { |
90 | .name = "RedBoot", | 89 | .name = "RedBoot", |
@@ -116,11 +115,7 @@ static struct mtd_partition wbd111_partitions[] = { | |||
116 | .mask_flags = MTD_WRITEABLE, | 115 | .mask_flags = MTD_WRITEABLE, |
117 | } | 116 | } |
118 | }; | 117 | }; |
119 | #define wbd111_num_partitions ARRAY_SIZE(wbd111_partitions) | 118 | #define wbd111_num_partitions ARRAY_SIZE(wbd111_partitions) |
120 | #else | ||
121 | #define wbd111_partitions NULL | ||
122 | #define wbd111_num_partitions 0 | ||
123 | #endif /* CONFIG_MTD_PARTITIONS */ | ||
124 | 119 | ||
125 | static void __init wbd111_init(void) | 120 | static void __init wbd111_init(void) |
126 | { | 121 | { |
diff --git a/arch/arm/mach-gemini/board-wbd222.c b/arch/arm/mach-gemini/board-wbd222.c index 99e5bbecf923..3a220347bc88 100644 --- a/arch/arm/mach-gemini/board-wbd222.c +++ b/arch/arm/mach-gemini/board-wbd222.c | |||
@@ -84,7 +84,6 @@ static struct sys_timer wbd222_timer = { | |||
84 | .init = gemini_timer_init, | 84 | .init = gemini_timer_init, |
85 | }; | 85 | }; |
86 | 86 | ||
87 | #ifdef CONFIG_MTD_PARTITIONS | ||
88 | static struct mtd_partition wbd222_partitions[] = { | 87 | static struct mtd_partition wbd222_partitions[] = { |
89 | { | 88 | { |
90 | .name = "RedBoot", | 89 | .name = "RedBoot", |
@@ -116,11 +115,7 @@ static struct mtd_partition wbd222_partitions[] = { | |||
116 | .mask_flags = MTD_WRITEABLE, | 115 | .mask_flags = MTD_WRITEABLE, |
117 | } | 116 | } |
118 | }; | 117 | }; |
119 | #define wbd222_num_partitions ARRAY_SIZE(wbd222_partitions) | 118 | #define wbd222_num_partitions ARRAY_SIZE(wbd222_partitions) |
120 | #else | ||
121 | #define wbd222_partitions NULL | ||
122 | #define wbd222_num_partitions 0 | ||
123 | #endif /* CONFIG_MTD_PARTITIONS */ | ||
124 | 119 | ||
125 | static void __init wbd222_init(void) | 120 | static void __init wbd222_init(void) |
126 | { | 121 | { |
diff --git a/arch/arm/mach-ixp4xx/ixdp425-setup.c b/arch/arm/mach-ixp4xx/ixdp425-setup.c index 140783386785..dca4f7f9f4f7 100644 --- a/arch/arm/mach-ixp4xx/ixdp425-setup.c +++ b/arch/arm/mach-ixp4xx/ixdp425-setup.c | |||
@@ -60,7 +60,6 @@ static struct platform_device ixdp425_flash = { | |||
60 | #if defined(CONFIG_MTD_NAND_PLATFORM) || \ | 60 | #if defined(CONFIG_MTD_NAND_PLATFORM) || \ |
61 | defined(CONFIG_MTD_NAND_PLATFORM_MODULE) | 61 | defined(CONFIG_MTD_NAND_PLATFORM_MODULE) |
62 | 62 | ||
63 | #ifdef CONFIG_MTD_PARTITIONS | ||
64 | const char *part_probes[] = { "cmdlinepart", NULL }; | 63 | const char *part_probes[] = { "cmdlinepart", NULL }; |
65 | 64 | ||
66 | static struct mtd_partition ixdp425_partitions[] = { | 65 | static struct mtd_partition ixdp425_partitions[] = { |
@@ -74,7 +73,6 @@ static struct mtd_partition ixdp425_partitions[] = { | |||
74 | .size = MTDPART_SIZ_FULL | 73 | .size = MTDPART_SIZ_FULL |
75 | }, | 74 | }, |
76 | }; | 75 | }; |
77 | #endif | ||
78 | 76 | ||
79 | static void | 77 | static void |
80 | ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) | 78 | ixdp425_flash_nand_cmd_ctrl(struct mtd_info *mtd, int cmd, unsigned int ctrl) |
@@ -103,11 +101,9 @@ static struct platform_nand_data ixdp425_flash_nand_data = { | |||
103 | .nr_chips = 1, | 101 | .nr_chips = 1, |
104 | .chip_delay = 30, | 102 | .chip_delay = 30, |
105 | .options = NAND_NO_AUTOINCR, | 103 | .options = NAND_NO_AUTOINCR, |
106 | #ifdef CONFIG_MTD_PARTITIONS | ||
107 | .part_probe_types = part_probes, | 104 | .part_probe_types = part_probes, |
108 | .partitions = ixdp425_partitions, | 105 | .partitions = ixdp425_partitions, |
109 | .nr_partitions = ARRAY_SIZE(ixdp425_partitions), | 106 | .nr_partitions = ARRAY_SIZE(ixdp425_partitions), |
110 | #endif | ||
111 | }, | 107 | }, |
112 | .ctrl = { | 108 | .ctrl = { |
113 | .cmd_ctrl = ixdp425_flash_nand_cmd_ctrl | 109 | .cmd_ctrl = ixdp425_flash_nand_cmd_ctrl |
diff --git a/arch/arm/mach-pxa/Kconfig b/arch/arm/mach-pxa/Kconfig index 2fc9f94cdd29..cd19309fd3b8 100644 --- a/arch/arm/mach-pxa/Kconfig +++ b/arch/arm/mach-pxa/Kconfig | |||
@@ -153,7 +153,6 @@ config MACH_XCEP | |||
153 | bool "Iskratel Electronics XCEP" | 153 | bool "Iskratel Electronics XCEP" |
154 | select PXA25x | 154 | select PXA25x |
155 | select MTD | 155 | select MTD |
156 | select MTD_PARTITIONS | ||
157 | select MTD_PHYSMAP | 156 | select MTD_PHYSMAP |
158 | select MTD_CFI_INTELEXT | 157 | select MTD_CFI_INTELEXT |
159 | select MTD_CFI | 158 | select MTD_CFI |
diff --git a/arch/arm/mach-s3c2410/mach-amlm5900.c b/arch/arm/mach-s3c2410/mach-amlm5900.c index 44440cbd7620..dabc141243f3 100644 --- a/arch/arm/mach-s3c2410/mach-amlm5900.c +++ b/arch/arm/mach-s3c2410/mach-amlm5900.c | |||
@@ -58,8 +58,6 @@ | |||
58 | #include <plat/cpu.h> | 58 | #include <plat/cpu.h> |
59 | #include <plat/gpio-cfg.h> | 59 | #include <plat/gpio-cfg.h> |
60 | 60 | ||
61 | #ifdef CONFIG_MTD_PARTITIONS | ||
62 | |||
63 | #include <linux/mtd/mtd.h> | 61 | #include <linux/mtd/mtd.h> |
64 | #include <linux/mtd/partitions.h> | 62 | #include <linux/mtd/partitions.h> |
65 | #include <linux/mtd/map.h> | 63 | #include <linux/mtd/map.h> |
@@ -113,7 +111,6 @@ static struct platform_device amlm5900_device_nor = { | |||
113 | .num_resources = 1, | 111 | .num_resources = 1, |
114 | .resource = &amlm5900_nor_resource, | 112 | .resource = &amlm5900_nor_resource, |
115 | }; | 113 | }; |
116 | #endif | ||
117 | 114 | ||
118 | static struct map_desc amlm5900_iodesc[] __initdata = { | 115 | static struct map_desc amlm5900_iodesc[] __initdata = { |
119 | }; | 116 | }; |
@@ -158,9 +155,7 @@ static struct platform_device *amlm5900_devices[] __initdata = { | |||
158 | &s3c_device_rtc, | 155 | &s3c_device_rtc, |
159 | &s3c_device_usbgadget, | 156 | &s3c_device_usbgadget, |
160 | &s3c_device_sdi, | 157 | &s3c_device_sdi, |
161 | #ifdef CONFIG_MTD_PARTITIONS | ||
162 | &amlm5900_device_nor, | 158 | &amlm5900_device_nor, |
163 | #endif | ||
164 | }; | 159 | }; |
165 | 160 | ||
166 | static void __init amlm5900_map_io(void) | 161 | static void __init amlm5900_map_io(void) |
diff --git a/arch/arm/mach-s3c2410/mach-tct_hammer.c b/arch/arm/mach-s3c2410/mach-tct_hammer.c index a15d0621c22f..43c2b831b9e8 100644 --- a/arch/arm/mach-s3c2410/mach-tct_hammer.c +++ b/arch/arm/mach-s3c2410/mach-tct_hammer.c | |||
@@ -49,8 +49,6 @@ | |||
49 | #include <plat/devs.h> | 49 | #include <plat/devs.h> |
50 | #include <plat/cpu.h> | 50 | #include <plat/cpu.h> |
51 | 51 | ||
52 | #ifdef CONFIG_MTD_PARTITIONS | ||
53 | |||
54 | #include <linux/mtd/mtd.h> | 52 | #include <linux/mtd/mtd.h> |
55 | #include <linux/mtd/partitions.h> | 53 | #include <linux/mtd/partitions.h> |
56 | #include <linux/mtd/map.h> | 54 | #include <linux/mtd/map.h> |
@@ -91,8 +89,6 @@ static struct platform_device tct_hammer_device_nor = { | |||
91 | .resource = &tct_hammer_nor_resource, | 89 | .resource = &tct_hammer_nor_resource, |
92 | }; | 90 | }; |
93 | 91 | ||
94 | #endif | ||
95 | |||
96 | static struct map_desc tct_hammer_iodesc[] __initdata = { | 92 | static struct map_desc tct_hammer_iodesc[] __initdata = { |
97 | }; | 93 | }; |
98 | 94 | ||
@@ -133,9 +129,7 @@ static struct platform_device *tct_hammer_devices[] __initdata = { | |||
133 | &s3c_device_rtc, | 129 | &s3c_device_rtc, |
134 | &s3c_device_usbgadget, | 130 | &s3c_device_usbgadget, |
135 | &s3c_device_sdi, | 131 | &s3c_device_sdi, |
136 | #ifdef CONFIG_MTD_PARTITIONS | ||
137 | &tct_hammer_device_nor, | 132 | &tct_hammer_device_nor, |
138 | #endif | ||
139 | }; | 133 | }; |
140 | 134 | ||
141 | static void __init tct_hammer_map_io(void) | 135 | static void __init tct_hammer_map_io(void) |
diff --git a/arch/blackfin/mach-bf537/boards/stamp.c b/arch/blackfin/mach-bf537/boards/stamp.c index e16dc4560048..76db1d483173 100644 --- a/arch/blackfin/mach-bf537/boards/stamp.c +++ b/arch/blackfin/mach-bf537/boards/stamp.c | |||
@@ -382,7 +382,6 @@ static struct platform_device net2272_bfin_device = { | |||
382 | #endif | 382 | #endif |
383 | 383 | ||
384 | #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) | 384 | #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) |
385 | #ifdef CONFIG_MTD_PARTITIONS | ||
386 | const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; | 385 | const char *part_probes[] = { "cmdlinepart", "RedBoot", NULL }; |
387 | 386 | ||
388 | static struct mtd_partition bfin_plat_nand_partitions[] = { | 387 | static struct mtd_partition bfin_plat_nand_partitions[] = { |
@@ -396,7 +395,6 @@ static struct mtd_partition bfin_plat_nand_partitions[] = { | |||
396 | .offset = MTDPART_OFS_APPEND, | 395 | .offset = MTDPART_OFS_APPEND, |
397 | }, | 396 | }, |
398 | }; | 397 | }; |
399 | #endif | ||
400 | 398 | ||
401 | #define BFIN_NAND_PLAT_CLE 2 | 399 | #define BFIN_NAND_PLAT_CLE 2 |
402 | #define BFIN_NAND_PLAT_ALE 1 | 400 | #define BFIN_NAND_PLAT_ALE 1 |
@@ -423,11 +421,9 @@ static struct platform_nand_data bfin_plat_nand_data = { | |||
423 | .chip = { | 421 | .chip = { |
424 | .nr_chips = 1, | 422 | .nr_chips = 1, |
425 | .chip_delay = 30, | 423 | .chip_delay = 30, |
426 | #ifdef CONFIG_MTD_PARTITIONS | ||
427 | .part_probe_types = part_probes, | 424 | .part_probe_types = part_probes, |
428 | .partitions = bfin_plat_nand_partitions, | 425 | .partitions = bfin_plat_nand_partitions, |
429 | .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions), | 426 | .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions), |
430 | #endif | ||
431 | }, | 427 | }, |
432 | .ctrl = { | 428 | .ctrl = { |
433 | .cmd_ctrl = bfin_plat_nand_cmd_ctrl, | 429 | .cmd_ctrl = bfin_plat_nand_cmd_ctrl, |
diff --git a/arch/blackfin/mach-bf561/boards/acvilon.c b/arch/blackfin/mach-bf561/boards/acvilon.c index 3926cd909b66..9231a942892b 100644 --- a/arch/blackfin/mach-bf561/boards/acvilon.c +++ b/arch/blackfin/mach-bf561/boards/acvilon.c | |||
@@ -243,7 +243,6 @@ static struct platform_device bfin_uart0_device = { | |||
243 | 243 | ||
244 | #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) | 244 | #if defined(CONFIG_MTD_NAND_PLATFORM) || defined(CONFIG_MTD_NAND_PLATFORM_MODULE) |
245 | 245 | ||
246 | #ifdef CONFIG_MTD_PARTITIONS | ||
247 | const char *part_probes[] = { "cmdlinepart", NULL }; | 246 | const char *part_probes[] = { "cmdlinepart", NULL }; |
248 | 247 | ||
249 | static struct mtd_partition bfin_plat_nand_partitions[] = { | 248 | static struct mtd_partition bfin_plat_nand_partitions[] = { |
@@ -257,7 +256,6 @@ static struct mtd_partition bfin_plat_nand_partitions[] = { | |||
257 | .offset = MTDPART_OFS_APPEND, | 256 | .offset = MTDPART_OFS_APPEND, |
258 | }, | 257 | }, |
259 | }; | 258 | }; |
260 | #endif | ||
261 | 259 | ||
262 | #define BFIN_NAND_PLAT_CLE 2 | 260 | #define BFIN_NAND_PLAT_CLE 2 |
263 | #define BFIN_NAND_PLAT_ALE 3 | 261 | #define BFIN_NAND_PLAT_ALE 3 |
@@ -286,11 +284,9 @@ static struct platform_nand_data bfin_plat_nand_data = { | |||
286 | .chip = { | 284 | .chip = { |
287 | .nr_chips = 1, | 285 | .nr_chips = 1, |
288 | .chip_delay = 30, | 286 | .chip_delay = 30, |
289 | #ifdef CONFIG_MTD_PARTITIONS | ||
290 | .part_probe_types = part_probes, | 287 | .part_probe_types = part_probes, |
291 | .partitions = bfin_plat_nand_partitions, | 288 | .partitions = bfin_plat_nand_partitions, |
292 | .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions), | 289 | .nr_partitions = ARRAY_SIZE(bfin_plat_nand_partitions), |
293 | #endif | ||
294 | }, | 290 | }, |
295 | .ctrl = { | 291 | .ctrl = { |
296 | .cmd_ctrl = bfin_plat_nand_cmd_ctrl, | 292 | .cmd_ctrl = bfin_plat_nand_cmd_ctrl, |
diff --git a/arch/cris/Kconfig b/arch/cris/Kconfig index b6b94a27d276..17addacb169e 100644 --- a/arch/cris/Kconfig +++ b/arch/cris/Kconfig | |||
@@ -270,7 +270,6 @@ config ETRAX_AXISFLASHMAP | |||
270 | select MTD_JEDECPROBE if ETRAX_ARCH_V32 | 270 | select MTD_JEDECPROBE if ETRAX_ARCH_V32 |
271 | select MTD_CHAR | 271 | select MTD_CHAR |
272 | select MTD_BLOCK | 272 | select MTD_BLOCK |
273 | select MTD_PARTITIONS | ||
274 | select MTD_COMPLEX_MAPPINGS | 273 | select MTD_COMPLEX_MAPPINGS |
275 | help | 274 | help |
276 | This option enables MTD mapping of flash devices. Needed to use | 275 | This option enables MTD mapping of flash devices. Needed to use |
diff --git a/arch/cris/arch-v10/drivers/axisflashmap.c b/arch/cris/arch-v10/drivers/axisflashmap.c index ed708e19d09e..a4bbdfd37bd8 100644 --- a/arch/cris/arch-v10/drivers/axisflashmap.c +++ b/arch/cris/arch-v10/drivers/axisflashmap.c | |||
@@ -372,7 +372,7 @@ static int __init init_axis_flash(void) | |||
372 | #ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE | 372 | #ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE |
373 | if (mymtd) { | 373 | if (mymtd) { |
374 | main_partition.size = mymtd->size; | 374 | main_partition.size = mymtd->size; |
375 | err = add_mtd_partitions(mymtd, &main_partition, 1); | 375 | err = mtd_device_register(mymtd, &main_partition, 1); |
376 | if (err) | 376 | if (err) |
377 | panic("axisflashmap: Could not initialize " | 377 | panic("axisflashmap: Could not initialize " |
378 | "partition for whole main mtd device!\n"); | 378 | "partition for whole main mtd device!\n"); |
@@ -382,10 +382,12 @@ static int __init init_axis_flash(void) | |||
382 | if (mymtd) { | 382 | if (mymtd) { |
383 | if (use_default_ptable) { | 383 | if (use_default_ptable) { |
384 | printk(KERN_INFO " Using default partition table.\n"); | 384 | printk(KERN_INFO " Using default partition table.\n"); |
385 | err = add_mtd_partitions(mymtd, axis_default_partitions, | 385 | err = mtd_device_register(mymtd, |
386 | NUM_DEFAULT_PARTITIONS); | 386 | axis_default_partitions, |
387 | NUM_DEFAULT_PARTITIONS); | ||
387 | } else { | 388 | } else { |
388 | err = add_mtd_partitions(mymtd, axis_partitions, pidx); | 389 | err = mtd_device_register(mymtd, axis_partitions, |
390 | pidx); | ||
389 | } | 391 | } |
390 | 392 | ||
391 | if (err) | 393 | if (err) |
diff --git a/arch/cris/arch-v32/drivers/Kconfig b/arch/cris/arch-v32/drivers/Kconfig index 1633b120aa81..41a2732e8b9c 100644 --- a/arch/cris/arch-v32/drivers/Kconfig +++ b/arch/cris/arch-v32/drivers/Kconfig | |||
@@ -405,7 +405,6 @@ config ETRAX_AXISFLASHMAP | |||
405 | select MTD_JEDECPROBE | 405 | select MTD_JEDECPROBE |
406 | select MTD_CHAR | 406 | select MTD_CHAR |
407 | select MTD_BLOCK | 407 | select MTD_BLOCK |
408 | select MTD_PARTITIONS | ||
409 | select MTD_COMPLEX_MAPPINGS | 408 | select MTD_COMPLEX_MAPPINGS |
410 | help | 409 | help |
411 | This option enables MTD mapping of flash devices. Needed to use | 410 | This option enables MTD mapping of flash devices. Needed to use |
diff --git a/arch/cris/arch-v32/drivers/axisflashmap.c b/arch/cris/arch-v32/drivers/axisflashmap.c index 7b155f8203b8..a2bde3744622 100644 --- a/arch/cris/arch-v32/drivers/axisflashmap.c +++ b/arch/cris/arch-v32/drivers/axisflashmap.c | |||
@@ -561,7 +561,7 @@ static int __init init_axis_flash(void) | |||
561 | #ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE | 561 | #ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE |
562 | if (main_mtd) { | 562 | if (main_mtd) { |
563 | main_partition.size = main_mtd->size; | 563 | main_partition.size = main_mtd->size; |
564 | err = add_mtd_partitions(main_mtd, &main_partition, 1); | 564 | err = mtd_device_register(main_mtd, &main_partition, 1); |
565 | if (err) | 565 | if (err) |
566 | panic("axisflashmap: Could not initialize " | 566 | panic("axisflashmap: Could not initialize " |
567 | "partition for whole main mtd device!\n"); | 567 | "partition for whole main mtd device!\n"); |
@@ -597,7 +597,8 @@ static int __init init_axis_flash(void) | |||
597 | mtd_ram->erasesize = (main_mtd ? main_mtd->erasesize : | 597 | mtd_ram->erasesize = (main_mtd ? main_mtd->erasesize : |
598 | CONFIG_ETRAX_PTABLE_SECTOR); | 598 | CONFIG_ETRAX_PTABLE_SECTOR); |
599 | } else { | 599 | } else { |
600 | err = add_mtd_partitions(main_mtd, &partition[part], 1); | 600 | err = mtd_device_register(main_mtd, &partition[part], |
601 | 1); | ||
601 | if (err) | 602 | if (err) |
602 | panic("axisflashmap: Could not add mtd " | 603 | panic("axisflashmap: Could not add mtd " |
603 | "partition %d\n", part); | 604 | "partition %d\n", part); |
@@ -633,7 +634,7 @@ static int __init init_axis_flash(void) | |||
633 | #ifndef CONFIG_ETRAX_VCS_SIM | 634 | #ifndef CONFIG_ETRAX_VCS_SIM |
634 | if (aux_mtd) { | 635 | if (aux_mtd) { |
635 | aux_partition.size = aux_mtd->size; | 636 | aux_partition.size = aux_mtd->size; |
636 | err = add_mtd_partitions(aux_mtd, &aux_partition, 1); | 637 | err = mtd_device_register(aux_mtd, &aux_partition, 1); |
637 | if (err) | 638 | if (err) |
638 | panic("axisflashmap: Could not initialize " | 639 | panic("axisflashmap: Could not initialize " |
639 | "aux mtd device!\n"); | 640 | "aux mtd device!\n"); |
diff --git a/arch/mips/cavium-octeon/flash_setup.c b/arch/mips/cavium-octeon/flash_setup.c index 008f657116eb..0ee02f5e51cc 100644 --- a/arch/mips/cavium-octeon/flash_setup.c +++ b/arch/mips/cavium-octeon/flash_setup.c | |||
@@ -16,7 +16,6 @@ | |||
16 | 16 | ||
17 | static struct map_info flash_map; | 17 | static struct map_info flash_map; |
18 | static struct mtd_info *mymtd; | 18 | static struct mtd_info *mymtd; |
19 | #ifdef CONFIG_MTD_PARTITIONS | ||
20 | static int nr_parts; | 19 | static int nr_parts; |
21 | static struct mtd_partition *parts; | 20 | static struct mtd_partition *parts; |
22 | static const char *part_probe_types[] = { | 21 | static const char *part_probe_types[] = { |
@@ -26,7 +25,6 @@ static const char *part_probe_types[] = { | |||
26 | #endif | 25 | #endif |
27 | NULL | 26 | NULL |
28 | }; | 27 | }; |
29 | #endif | ||
30 | 28 | ||
31 | /** | 29 | /** |
32 | * Module/ driver initialization. | 30 | * Module/ driver initialization. |
@@ -63,17 +61,10 @@ static int __init flash_init(void) | |||
63 | if (mymtd) { | 61 | if (mymtd) { |
64 | mymtd->owner = THIS_MODULE; | 62 | mymtd->owner = THIS_MODULE; |
65 | 63 | ||
66 | #ifdef CONFIG_MTD_PARTITIONS | ||
67 | nr_parts = parse_mtd_partitions(mymtd, | 64 | nr_parts = parse_mtd_partitions(mymtd, |
68 | part_probe_types, | 65 | part_probe_types, |
69 | &parts, 0); | 66 | &parts, 0); |
70 | if (nr_parts > 0) | 67 | mtd_device_register(mymtd, parts, nr_parts); |
71 | add_mtd_partitions(mymtd, parts, nr_parts); | ||
72 | else | ||
73 | add_mtd_device(mymtd); | ||
74 | #else | ||
75 | add_mtd_device(mymtd); | ||
76 | #endif | ||
77 | } else { | 68 | } else { |
78 | pr_err("Failed to register MTD device for flash\n"); | 69 | pr_err("Failed to register MTD device for flash\n"); |
79 | } | 70 | } |
diff --git a/arch/mips/txx9/generic/setup.c b/arch/mips/txx9/generic/setup.c index 812816c45662..ec38e00b2559 100644 --- a/arch/mips/txx9/generic/setup.c +++ b/arch/mips/txx9/generic/setup.c | |||
@@ -639,7 +639,6 @@ void __init txx9_physmap_flash_init(int no, unsigned long addr, | |||
639 | .flags = IORESOURCE_MEM, | 639 | .flags = IORESOURCE_MEM, |
640 | }; | 640 | }; |
641 | struct platform_device *pdev; | 641 | struct platform_device *pdev; |
642 | #ifdef CONFIG_MTD_PARTITIONS | ||
643 | static struct mtd_partition parts[2]; | 642 | static struct mtd_partition parts[2]; |
644 | struct physmap_flash_data pdata_part; | 643 | struct physmap_flash_data pdata_part; |
645 | 644 | ||
@@ -658,7 +657,7 @@ void __init txx9_physmap_flash_init(int no, unsigned long addr, | |||
658 | pdata_part.parts = parts; | 657 | pdata_part.parts = parts; |
659 | pdata = &pdata_part; | 658 | pdata = &pdata_part; |
660 | } | 659 | } |
661 | #endif | 660 | |
662 | pdev = platform_device_alloc("physmap-flash", no); | 661 | pdev = platform_device_alloc("physmap-flash", no); |
663 | if (!pdev || | 662 | if (!pdev || |
664 | platform_device_add_resources(pdev, &res, 1) || | 663 | platform_device_add_resources(pdev, &res, 1) || |