aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/impa7.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/impa7.c')
-rw-r--r--drivers/mtd/maps/impa7.c28
1 files changed, 4 insertions, 24 deletions
diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c
index 404a50cbafa0..f47aedb24366 100644
--- a/drivers/mtd/maps/impa7.c
+++ b/drivers/mtd/maps/impa7.c
@@ -49,7 +49,7 @@ static struct map_info impa7_map[NUM_FLASHBANKS] = {
49/* 49/*
50 * MTD partitioning stuff 50 * MTD partitioning stuff
51 */ 51 */
52static struct mtd_partition static_partitions[] = 52static struct mtd_partition partitions[] =
53{ 53{
54 { 54 {
55 .name = "FileSystem", 55 .name = "FileSystem",
@@ -58,16 +58,10 @@ static struct mtd_partition static_partitions[] =
58 }, 58 },
59}; 59};
60 60
61static int mtd_parts_nb[NUM_FLASHBANKS];
62static struct mtd_partition *mtd_parts[NUM_FLASHBANKS];
63
64static const char *probes[] = { "cmdlinepart", NULL };
65
66static int __init init_impa7(void) 61static int __init init_impa7(void)
67{ 62{
68 static const char *rom_probe_types[] = PROBETYPES; 63 static const char *rom_probe_types[] = PROBETYPES;
69 const char **type; 64 const char **type;
70 const char *part_type = 0;
71 int i; 65 int i;
72 static struct { u_long addr; u_long size; } pt[NUM_FLASHBANKS] = { 66 static struct { u_long addr; u_long size; } pt[NUM_FLASHBANKS] = {
73 { WINDOW_ADDR0, WINDOW_SIZE0 }, 67 { WINDOW_ADDR0, WINDOW_SIZE0 },
@@ -97,23 +91,9 @@ static int __init init_impa7(void)
97 if (impa7_mtd[i]) { 91 if (impa7_mtd[i]) {
98 impa7_mtd[i]->owner = THIS_MODULE; 92 impa7_mtd[i]->owner = THIS_MODULE;
99 devicesfound++; 93 devicesfound++;
100 mtd_parts_nb[i] = parse_mtd_partitions(impa7_mtd[i], 94 mtd_device_parse_register(impa7_mtd[i], NULL, 0,
101 probes, 95 partitions,
102 &mtd_parts[i], 96 ARRAY_SIZE(partitions));
103 0);
104 if (mtd_parts_nb[i] > 0) {
105 part_type = "command line";
106 } else {
107 mtd_parts[i] = static_partitions;
108 mtd_parts_nb[i] = ARRAY_SIZE(static_partitions);
109 part_type = "static";
110 }
111
112 printk(KERN_NOTICE MSG_PREFIX
113 "using %s partition definition\n",
114 part_type);
115 mtd_device_register(impa7_mtd[i],
116 mtd_parts[i], mtd_parts_nb[i]);
117 } 97 }
118 else 98 else
119 iounmap((void *)impa7_map[i].virt); 99 iounmap((void *)impa7_map[i].virt);