From: Adrian Bunk - adds the missing dependency of ROMFS_FS on BLOCK || MTD - disallows the illegal ROMFS_FS=y, MTD=m, ROMFS_ON_MTD=y - ensures that at least one of ROMFS_ON_BLOCK and ROMFS_ON_MTD is always enabled: - automatically enable ROMFS_ON_MTD if BLOCK=n - automatically enable ROMFS_ON_BLOCK if ROMFS_ON_MTD=n - if EMBEDDED=n, ROMFS_ON_BLOCK is always enabled - the "(which may have been disabled)" that could now confuse users has therefore been removed from the help text Signed-off-by: Adrian Bunk Acked-by: David Howells Signed-off-by: Andrew Morton --- fs/Kconfig | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff -puN fs/Kconfig~nommu-make-it-possible-for-romfs-to-use-mtd-devices-fix fs/Kconfig --- a/fs/Kconfig~nommu-make-it-possible-for-romfs-to-use-mtd-devices-fix +++ a/fs/Kconfig @@ -482,6 +482,7 @@ endif config ROMFS_FS tristate "ROM file system support" + depends on BLOCK || MTD ---help--- This is a very small read-only file system mainly intended for initial ram disks of installation disks, but it could be used for @@ -497,8 +498,9 @@ config ROMFS_FS answer N. config ROMFS_ON_BLOCK - bool "Block device-backed ROM file system support" + bool "Block device-backed ROM file system support" if (ROMFS_ON_MTD && EMBEDDED) depends on ROMFS_FS && BLOCK + default y help This permits ROMFS to use block devices buffered through the page cache as the medium from which to retrieve data. It does not allow @@ -507,14 +509,15 @@ config ROMFS_ON_BLOCK If unsure, answer Y. config ROMFS_ON_MTD - bool "MTD-backed ROM file system support" - depends on ROMFS_FS && MTD + bool "MTD-backed ROM file system support" if BLOCK + depends on ROMFS_FS + depends on MTD=y || (ROMFS_FS=m && MTD) + default y help This permits ROMFS to use MTD based devices directly, without the - intercession of the block layer (which may have been disabled). It - also allows direct mapping of MTD devices through romfs files under - NOMMU conditions if the underlying device is directly addressable by - the CPU. + intercession of the block layer. It also allows direct mapping of + MTD devices through romfs files under NOMMU conditions if the + underlying device is directly addressable by the CPU. If unsure, answer Y. _