aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/dc21285.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/dc21285.c')
-rw-r--r--drivers/mtd/maps/dc21285.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/mtd/maps/dc21285.c b/drivers/mtd/maps/dc21285.c
index 7a9e1989c977..f43b365b848c 100644
--- a/drivers/mtd/maps/dc21285.c
+++ b/drivers/mtd/maps/dc21285.c
@@ -145,14 +145,10 @@ static struct map_info dc21285_map = {
145 145
146 146
147/* Partition stuff */ 147/* Partition stuff */
148static struct mtd_partition *dc21285_parts;
149static const char *probes[] = { "RedBoot", "cmdlinepart", NULL }; 148static const char *probes[] = { "RedBoot", "cmdlinepart", NULL };
150 149
151static int __init init_dc21285(void) 150static int __init init_dc21285(void)
152{ 151{
153
154 int nrparts;
155
156 /* Determine bankwidth */ 152 /* Determine bankwidth */
157 switch (*CSR_SA110_CNTL & (3<<14)) { 153 switch (*CSR_SA110_CNTL & (3<<14)) {
158 case SA110_CNTL_ROMWIDTH_8: 154 case SA110_CNTL_ROMWIDTH_8:
@@ -200,8 +196,7 @@ static int __init init_dc21285(void)
200 196
201 dc21285_mtd->owner = THIS_MODULE; 197 dc21285_mtd->owner = THIS_MODULE;
202 198
203 nrparts = parse_mtd_partitions(dc21285_mtd, probes, &dc21285_parts, 0); 199 mtd_device_parse_register(dc21285_mtd, probes, 0, NULL, 0);
204 mtd_device_register(dc21285_mtd, dc21285_parts, nrparts);
205 200
206 if(machine_is_ebsa285()) { 201 if(machine_is_ebsa285()) {
207 /* 202 /*
@@ -224,8 +219,6 @@ static int __init init_dc21285(void)
224static void __exit cleanup_dc21285(void) 219static void __exit cleanup_dc21285(void)
225{ 220{
226 mtd_device_unregister(dc21285_mtd); 221 mtd_device_unregister(dc21285_mtd);
227 if (dc21285_parts)
228 kfree(dc21285_parts);
229 map_destroy(dc21285_mtd); 222 map_destroy(dc21285_mtd);
230 iounmap(dc21285_map.virt); 223 iounmap(dc21285_map.virt);
231} 224}