diff options
Diffstat (limited to 'drivers/mtd/nand/edb7312.c')
-rw-r--r-- | drivers/mtd/nand/edb7312.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/mtd/nand/edb7312.c b/drivers/mtd/nand/edb7312.c index 86366bfba9f8..8400d0f6dada 100644 --- a/drivers/mtd/nand/edb7312.c +++ b/drivers/mtd/nand/edb7312.c | |||
@@ -55,7 +55,6 @@ static unsigned long ep7312_fio_pbase = EP7312_FIO_PBASE; | |||
55 | static void __iomem *ep7312_pxdr = (void __iomem *)EP7312_PXDR; | 55 | static void __iomem *ep7312_pxdr = (void __iomem *)EP7312_PXDR; |
56 | static void __iomem *ep7312_pxddr = (void __iomem *)EP7312_PXDDR; | 56 | static void __iomem *ep7312_pxddr = (void __iomem *)EP7312_PXDDR; |
57 | 57 | ||
58 | #ifdef CONFIG_MTD_PARTITIONS | ||
59 | /* | 58 | /* |
60 | * Define static partitions for flash device | 59 | * Define static partitions for flash device |
61 | */ | 60 | */ |
@@ -67,8 +66,6 @@ static struct mtd_partition partition_info[] = { | |||
67 | 66 | ||
68 | #define NUM_PARTITIONS 1 | 67 | #define NUM_PARTITIONS 1 |
69 | 68 | ||
70 | #endif | ||
71 | |||
72 | /* | 69 | /* |
73 | * hardware specific access to control-lines | 70 | * hardware specific access to control-lines |
74 | * | 71 | * |
@@ -101,9 +98,7 @@ static int ep7312_device_ready(struct mtd_info *mtd) | |||
101 | return 1; | 98 | return 1; |
102 | } | 99 | } |
103 | 100 | ||
104 | #ifdef CONFIG_MTD_PARTITIONS | ||
105 | const char *part_probes[] = { "cmdlinepart", NULL }; | 101 | const char *part_probes[] = { "cmdlinepart", NULL }; |
106 | #endif | ||
107 | 102 | ||
108 | /* | 103 | /* |
109 | * Main initialization routine | 104 | * Main initialization routine |
@@ -162,14 +157,12 @@ static int __init ep7312_init(void) | |||
162 | kfree(ep7312_mtd); | 157 | kfree(ep7312_mtd); |
163 | return -ENXIO; | 158 | return -ENXIO; |
164 | } | 159 | } |
165 | #ifdef CONFIG_MTD_PARTITIONS | ||
166 | ep7312_mtd->name = "edb7312-nand"; | 160 | ep7312_mtd->name = "edb7312-nand"; |
167 | mtd_parts_nb = parse_mtd_partitions(ep7312_mtd, part_probes, &mtd_parts, 0); | 161 | mtd_parts_nb = parse_mtd_partitions(ep7312_mtd, part_probes, &mtd_parts, 0); |
168 | if (mtd_parts_nb > 0) | 162 | if (mtd_parts_nb > 0) |
169 | part_type = "command line"; | 163 | part_type = "command line"; |
170 | else | 164 | else |
171 | mtd_parts_nb = 0; | 165 | mtd_parts_nb = 0; |
172 | #endif | ||
173 | if (mtd_parts_nb == 0) { | 166 | if (mtd_parts_nb == 0) { |
174 | mtd_parts = partition_info; | 167 | mtd_parts = partition_info; |
175 | mtd_parts_nb = NUM_PARTITIONS; | 168 | mtd_parts_nb = NUM_PARTITIONS; |
@@ -178,7 +171,7 @@ static int __init ep7312_init(void) | |||
178 | 171 | ||
179 | /* Register the partitions */ | 172 | /* Register the partitions */ |
180 | printk(KERN_NOTICE "Using %s partition definition\n", part_type); | 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 | /* Return happy */ | 176 | /* Return happy */ |
184 | return 0; | 177 | return 0; |