diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-05-23 05:22:54 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 21:21:11 -0400 |
commit | 5851becb5bae13ca6525fd0d97116043fcb0e20e (patch) | |
tree | 848fe877cb9e4039fc381dcf416c623e232db889 /arch/mips | |
parent | 36cda05b375ad0fbaba3879047b62d270d214376 (diff) |
mtd: octeon: convert to mtd_device_register()
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'arch/mips')
-rw-r--r-- | arch/mips/cavium-octeon/flash_setup.c | 11 |
1 files changed, 1 insertions, 10 deletions
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 | } |