Commit da499d414b964403e0070a2b0113b1a4180c6fbe
Committed by
David Woodhouse
1 parent
0f47e952fe
Exists in
master
and in
4 other branches
mtd: edb7312 nand: convert to mtd_device_register()
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS preprocessor conditionals as partitioning is always available. 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>
Showing 1 changed file with 1 additions and 8 deletions Side-by-side Diff
drivers/mtd/nand/edb7312.c
... | ... | @@ -55,7 +55,6 @@ |
55 | 55 | static void __iomem *ep7312_pxdr = (void __iomem *)EP7312_PXDR; |
56 | 56 | static void __iomem *ep7312_pxddr = (void __iomem *)EP7312_PXDDR; |
57 | 57 | |
58 | -#ifdef CONFIG_MTD_PARTITIONS | |
59 | 58 | /* |
60 | 59 | * Define static partitions for flash device |
61 | 60 | */ |
... | ... | @@ -67,8 +66,6 @@ |
67 | 66 | |
68 | 67 | #define NUM_PARTITIONS 1 |
69 | 68 | |
70 | -#endif | |
71 | - | |
72 | 69 | /* |
73 | 70 | * hardware specific access to control-lines |
74 | 71 | * |
75 | 72 | |
... | ... | @@ -101,9 +98,7 @@ |
101 | 98 | return 1; |
102 | 99 | } |
103 | 100 | |
104 | -#ifdef CONFIG_MTD_PARTITIONS | |
105 | 101 | const char *part_probes[] = { "cmdlinepart", NULL }; |
106 | -#endif | |
107 | 102 | |
108 | 103 | /* |
109 | 104 | * Main initialization routine |
110 | 105 | |
... | ... | @@ -162,14 +157,12 @@ |
162 | 157 | kfree(ep7312_mtd); |
163 | 158 | return -ENXIO; |
164 | 159 | } |
165 | -#ifdef CONFIG_MTD_PARTITIONS | |
166 | 160 | ep7312_mtd->name = "edb7312-nand"; |
167 | 161 | mtd_parts_nb = parse_mtd_partitions(ep7312_mtd, part_probes, &mtd_parts, 0); |
168 | 162 | if (mtd_parts_nb > 0) |
169 | 163 | part_type = "command line"; |
170 | 164 | else |
171 | 165 | mtd_parts_nb = 0; |
172 | -#endif | |
173 | 166 | if (mtd_parts_nb == 0) { |
174 | 167 | mtd_parts = partition_info; |
175 | 168 | mtd_parts_nb = NUM_PARTITIONS; |
... | ... | @@ -178,7 +171,7 @@ |
178 | 171 | |
179 | 172 | /* Register the partitions */ |
180 | 173 | printk(KERN_NOTICE "Using %s partition definition\n", part_type); |
181 | - add_mtd_partitions(ep7312_mtd, mtd_parts, mtd_parts_nb); | |
174 | + mtd_device_register(ep7312_mtd, mtd_parts, mtd_parts_nb); | |
182 | 175 | |
183 | 176 | /* Return happy */ |
184 | 177 | return 0; |