Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mtd: uclinux: convert to mtd_device_register()

Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.

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>

authored by

Jamie Iles and committed by
David Woodhouse
5e7e9686 b5c0a4ea

+3 -11
+1 -1
drivers/mtd/maps/Kconfig
··· 472 472 473 473 config MTD_UCLINUX 474 474 bool "Generic uClinux RAM/ROM filesystem support" 475 - depends on MTD_PARTITIONS && MTD_RAM=y && !MMU 475 + depends on MTD_RAM=y && !MMU 476 476 help 477 477 Map driver to support image based filesystems for uClinux. 478 478
+2 -10
drivers/mtd/maps/uclinux.c
··· 89 89 mtd->priv = mapp; 90 90 91 91 uclinux_ram_mtdinfo = mtd; 92 - #ifdef CONFIG_MTD_PARTITIONS 93 - add_mtd_partitions(mtd, uclinux_romfs, NUM_PARTITIONS); 94 - #else 95 - add_mtd_device(mtd); 96 - #endif 92 + mtd_device_register(mtd, uclinux_romfs, NUM_PARTITIONS); 97 93 98 94 return(0); 99 95 } ··· 99 103 static void __exit uclinux_mtd_cleanup(void) 100 104 { 101 105 if (uclinux_ram_mtdinfo) { 102 - #ifdef CONFIG_MTD_PARTITIONS 103 - del_mtd_partitions(uclinux_ram_mtdinfo); 104 - #else 105 - del_mtd_device(uclinux_ram_mtdinfo); 106 - #endif 106 + mtd_device_unregister(uclinux_ram_mtdinfo); 107 107 map_destroy(uclinux_ram_mtdinfo); 108 108 uclinux_ram_mtdinfo = NULL; 109 109 }