aboutsummaryrefslogtreecommitdiffstats
path: root/arch/mips/cavium-octeon/flash_setup.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/mips/cavium-octeon/flash_setup.c')
-rw-r--r--arch/mips/cavium-octeon/flash_setup.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/arch/mips/cavium-octeon/flash_setup.c b/arch/mips/cavium-octeon/flash_setup.c
index 008f657116eb..0ee02f5e51cc 100644
--- a/arch/mips/cavium-octeon/flash_setup.c
+++ b/arch/mips/cavium-octeon/flash_setup.c
@@ -16,7 +16,6 @@
16 16
17static struct map_info flash_map; 17static struct map_info flash_map;
18static struct mtd_info *mymtd; 18static struct mtd_info *mymtd;
19#ifdef CONFIG_MTD_PARTITIONS
20static int nr_parts; 19static int nr_parts;
21static struct mtd_partition *parts; 20static struct mtd_partition *parts;
22static const char *part_probe_types[] = { 21static const char *part_probe_types[] = {
@@ -26,7 +25,6 @@ static const char *part_probe_types[] = {
26#endif 25#endif
27 NULL 26 NULL
28}; 27};
29#endif
30 28
31/** 29/**
32 * Module/ driver initialization. 30 * Module/ driver initialization.
@@ -63,17 +61,10 @@ static int __init flash_init(void)
63 if (mymtd) { 61 if (mymtd) {
64 mymtd->owner = THIS_MODULE; 62 mymtd->owner = THIS_MODULE;
65 63
66#ifdef CONFIG_MTD_PARTITIONS
67 nr_parts = parse_mtd_partitions(mymtd, 64 nr_parts = parse_mtd_partitions(mymtd,
68 part_probe_types, 65 part_probe_types,
69 &parts, 0); 66 &parts, 0);
70 if (nr_parts > 0) 67 mtd_device_register(mymtd, parts, nr_parts);
71 add_mtd_partitions(mymtd, parts, nr_parts);
72 else
73 add_mtd_device(mymtd);
74#else
75 add_mtd_device(mymtd);
76#endif
77 } else { 68 } else {
78 pr_err("Failed to register MTD device for flash\n"); 69 pr_err("Failed to register MTD device for flash\n");
79 } 70 }