aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd')
-rw-r--r--drivers/mtd/maps/impa7.c27
1 files changed, 4 insertions, 23 deletions
diff --git a/drivers/mtd/maps/impa7.c b/drivers/mtd/maps/impa7.c
index 2d45a489622e..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,15 +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
64
65static int __init init_impa7(void) 61static int __init init_impa7(void)
66{ 62{
67 static const char *rom_probe_types[] = PROBETYPES; 63 static const char *rom_probe_types[] = PROBETYPES;
68 const char **type; 64 const char **type;
69 const char *part_type = 0;
70 int i; 65 int i;
71 static struct { u_long addr; u_long size; } pt[NUM_FLASHBANKS] = { 66 static struct { u_long addr; u_long size; } pt[NUM_FLASHBANKS] = {
72 { WINDOW_ADDR0, WINDOW_SIZE0 }, 67 { WINDOW_ADDR0, WINDOW_SIZE0 },
@@ -96,23 +91,9 @@ static int __init init_impa7(void)
96 if (impa7_mtd[i]) { 91 if (impa7_mtd[i]) {
97 impa7_mtd[i]->owner = THIS_MODULE; 92 impa7_mtd[i]->owner = THIS_MODULE;
98 devicesfound++; 93 devicesfound++;
99 mtd_parts_nb[i] = parse_mtd_partitions(impa7_mtd[i], 94 mtd_device_parse_register(impa7_mtd[i], NULL, 0,
100 NULL, 95 partitions,
101 &mtd_parts[i], 96 ARRAY_SIZE(partitions));
102 0);
103 if (mtd_parts_nb[i] > 0) {
104 part_type = "command line";
105 } else {
106 mtd_parts[i] = static_partitions;
107 mtd_parts_nb[i] = ARRAY_SIZE(static_partitions);
108 part_type = "static";
109 }
110
111 printk(KERN_NOTICE MSG_PREFIX
112 "using %s partition definition\n",
113 part_type);
114 mtd_device_register(impa7_mtd[i],
115 mtd_parts[i], mtd_parts_nb[i]);
116 } 97 }
117 else 98 else
118 iounmap((void *)impa7_map[i].virt); 99 iounmap((void *)impa7_map[i].virt);