diff options
-rw-r--r-- | drivers/mtd/nand/edb7312.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/drivers/mtd/nand/edb7312.c b/drivers/mtd/nand/edb7312.c index 2f9374b38b90..0b1bb91d46a9 100644 --- a/drivers/mtd/nand/edb7312.c +++ b/drivers/mtd/nand/edb7312.c | |||
@@ -104,9 +104,6 @@ static int ep7312_device_ready(struct mtd_info *mtd) | |||
104 | static int __init ep7312_init(void) | 104 | static int __init ep7312_init(void) |
105 | { | 105 | { |
106 | struct nand_chip *this; | 106 | struct nand_chip *this; |
107 | const char *part_type = 0; | ||
108 | int mtd_parts_nb = 0; | ||
109 | struct mtd_partition *mtd_parts = 0; | ||
110 | void __iomem *ep7312_fio_base; | 107 | void __iomem *ep7312_fio_base; |
111 | 108 | ||
112 | /* Allocate memory for MTD device structure and private data */ | 109 | /* Allocate memory for MTD device structure and private data */ |
@@ -156,20 +153,10 @@ static int __init ep7312_init(void) | |||
156 | return -ENXIO; | 153 | return -ENXIO; |
157 | } | 154 | } |
158 | ep7312_mtd->name = "edb7312-nand"; | 155 | ep7312_mtd->name = "edb7312-nand"; |
159 | mtd_parts_nb = parse_mtd_partitions(ep7312_mtd, NULL, &mtd_parts, 0); | ||
160 | if (mtd_parts_nb > 0) | ||
161 | part_type = "command line"; | ||
162 | else | ||
163 | mtd_parts_nb = 0; | ||
164 | if (mtd_parts_nb == 0) { | ||
165 | mtd_parts = partition_info; | ||
166 | mtd_parts_nb = NUM_PARTITIONS; | ||
167 | part_type = "static"; | ||
168 | } | ||
169 | 156 | ||
170 | /* Register the partitions */ | 157 | /* Register the partitions */ |
171 | printk(KERN_NOTICE "Using %s partition definition\n", part_type); | 158 | mtd_device_register(ep7312_mtd, NULL, 0, |
172 | mtd_device_register(ep7312_mtd, mtd_parts, mtd_parts_nb); | 159 | partition_info, NUM_PARTITIONS); |
173 | 160 | ||
174 | /* Return happy */ | 161 | /* Return happy */ |
175 | return 0; | 162 | return 0; |