[RFC/PATCH] mtd: Hide CONFIG_MTD_BLKDEVS from the menu
Brian Norris
computersforpeace at gmail.com
Sun Jan 5 03:46:10 EST 2014
Hi Ezequiel,
On Fri, Dec 13, 2013 at 10:58:44AM -0300, Ezequiel Garcia wrote:
> Make this option a hidden one and get a cleaner configuration.
> This option just selects a common infrastructure for MTD-based devices
> to expose a block interface. There is no point in allowing a separate
> enable/disable.
>
> Signed-off-by: Ezequiel Garcia <ezequiel.garcia at free-electrons.com>
> ---
> drivers/mtd/Kconfig | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
> index 5fab4e6e..2a0ca2a 100644
> --- a/drivers/mtd/Kconfig
> +++ b/drivers/mtd/Kconfig
> @@ -158,9 +158,7 @@ config MTD_BCM47XX_PARTS
> comment "User Modules And Translation Layers"
>
> config MTD_BLKDEVS
> - tristate "Common interface to block layer for MTD 'translation layers'"
> - depends on BLOCK
> - default n
> + bool
>
> config MTD_BLOCK
> tristate "Caching block device access to MTD devices"
Hmm, I'm seeing some issues with this patch. I think it's problematic
that you are changing MTD_BLKDEVS from tristate to bool. We can't have
MTD_BLKDEVS built into the kernel while MTD itself is built as a module.
This manifests in linker errors in my all-module builds, with .config
like this (note that MTD_BLKDEVS gets "select"ed by MTD_SWAP, which
forces it to be built-in, not built as a module):
CONFIG_MTD=m
CONFIG_MTD_BLKDEVS=y
CONFIG_MTD_SWAP=m
[...]
Building modules, stage 2.
MODPOST 14 modules
ERROR: "deregister_mtd_blktrans" [drivers/mtd/mtdswap.ko] undefined!
ERROR: "register_mtd_blktrans" [drivers/mtd/mtdswap.ko] undefined!
ERROR: "add_mtd_blktrans_dev" [drivers/mtd/mtdswap.ko] undefined!
ERROR: "mtd_blktrans_cease_background" [drivers/mtd/mtdswap.ko] undefined!
ERROR: "del_mtd_blktrans_dev" [drivers/mtd/mtdswap.ko] undefined!
make[1]: *** [__modpost] Error 1
make: *** [modules] Error 2
I believe the correct solution would be the following additional diff:
diff --git a/drivers/mtd/Kconfig b/drivers/mtd/Kconfig
index cdaa4e512c97..5ebcda39f554 100644
--- a/drivers/mtd/Kconfig
+++ b/drivers/mtd/Kconfig
@@ -161,7 +161,7 @@ comment "User Modules And Translation Layers"
# MTD block device support is select'ed if needed
#
config MTD_BLKDEVS
- bool
+ tristate
config MTD_BLOCK
tristate "Caching block device access to MTD devices"
--
I'll squash this into your patch if I don't hear any objections.
Brian
More information about the linux-mtd
mailing list