mtd: cris: convert to mtd_device_register()
authorJamie Iles <jamie@jamieiles.com>
Mon, 23 May 2011 09:22:53 +0000 (10:22 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Wed, 25 May 2011 01:21:07 +0000 (02:21 +0100)
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.

Cc: Mikael Starvik <starvik@axis.com>
Cc: Jesper Nilsson <jesper.nilsson@axis.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
arch/cris/Kconfig
arch/cris/arch-v10/drivers/axisflashmap.c
arch/cris/arch-v32/drivers/Kconfig
arch/cris/arch-v32/drivers/axisflashmap.c

index a6d03069d0fff21a51bff6c94ec11e7a18be2f9f..72facbced326d062cacce5eb0463fe700493f115 100644 (file)
@@ -274,7 +274,6 @@ config ETRAX_AXISFLASHMAP
        select MTD_JEDECPROBE if ETRAX_ARCH_V32
        select MTD_CHAR
        select MTD_BLOCK
-       select MTD_PARTITIONS
        select MTD_COMPLEX_MAPPINGS
        help
          This option enables MTD mapping of flash devices.  Needed to use
index ed708e19d09eb3575c50c05f4c6cf06ee55c854d..a4bbdfd37bd8f74f9255d2617e8bc8375d75c8ad 100644 (file)
@@ -372,7 +372,7 @@ static int __init init_axis_flash(void)
 #ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE
        if (mymtd) {
                main_partition.size = mymtd->size;
-               err = add_mtd_partitions(mymtd, &main_partition, 1);
+               err = mtd_device_register(mymtd, &main_partition, 1);
                if (err)
                        panic("axisflashmap: Could not initialize "
                              "partition for whole main mtd device!\n");
@@ -382,10 +382,12 @@ static int __init init_axis_flash(void)
         if (mymtd) {
                if (use_default_ptable) {
                        printk(KERN_INFO " Using default partition table.\n");
-                       err = add_mtd_partitions(mymtd, axis_default_partitions,
-                                                NUM_DEFAULT_PARTITIONS);
+                       err = mtd_device_register(mymtd,
+                                                 axis_default_partitions,
+                                                 NUM_DEFAULT_PARTITIONS);
                } else {
-                       err = add_mtd_partitions(mymtd, axis_partitions, pidx);
+                       err = mtd_device_register(mymtd, axis_partitions,
+                                                 pidx);
                }
 
                if (err)
index 1633b120aa81a413b00422629cdbc61a4310ce4a..41a2732e8b9c406f664d93ce065eff6e646d2487 100644 (file)
@@ -405,7 +405,6 @@ config ETRAX_AXISFLASHMAP
        select MTD_JEDECPROBE
        select MTD_CHAR
        select MTD_BLOCK
-       select MTD_PARTITIONS
        select MTD_COMPLEX_MAPPINGS
        help
          This option enables MTD mapping of flash devices.  Needed to use
index 7b155f8203b8d0d179022733825a504667cd4da8..a2bde3744622fec40df210616e6aef82c76b3cc4 100644 (file)
@@ -561,7 +561,7 @@ static int __init init_axis_flash(void)
 #ifdef CONFIG_ETRAX_AXISFLASHMAP_MTD0WHOLE
        if (main_mtd) {
                main_partition.size = main_mtd->size;
-               err = add_mtd_partitions(main_mtd, &main_partition, 1);
+               err = mtd_device_register(main_mtd, &main_partition, 1);
                if (err)
                        panic("axisflashmap: Could not initialize "
                              "partition for whole main mtd device!\n");
@@ -597,7 +597,8 @@ static int __init init_axis_flash(void)
                        mtd_ram->erasesize = (main_mtd ? main_mtd->erasesize :
                                CONFIG_ETRAX_PTABLE_SECTOR);
                } else {
-                       err = add_mtd_partitions(main_mtd, &partition[part], 1);
+                       err = mtd_device_register(main_mtd, &partition[part],
+                                                 1);
                        if (err)
                                panic("axisflashmap: Could not add mtd "
                                        "partition %d\n", part);
@@ -633,7 +634,7 @@ static int __init init_axis_flash(void)
 #ifndef CONFIG_ETRAX_VCS_SIM
        if (aux_mtd) {
                aux_partition.size = aux_mtd->size;
-               err = add_mtd_partitions(aux_mtd, &aux_partition, 1);
+               err = mtd_device_register(aux_mtd, &aux_partition, 1);
                if (err)
                        panic("axisflashmap: Could not initialize "
                              "aux mtd device!\n");