gpio: mxs: GPIO_MXS should not default to y unconditionally
authorGeert Uytterhoeven <geert+renesas@glider.be>
Mon, 8 Feb 2021 14:51:53 +0000 (15:51 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Feb 2021 10:02:20 +0000 (11:02 +0100)
commit 97c6e28d388a5000d780d2a63c32f422827f5aa3 upstream.

Merely enabling CONFIG_COMPILE_TEST should not enable additional code.
To fix this, restrict the automatic enabling of GPIO_MXS to ARCH_MXS,
and ask the user in case of compile-testing.

Fixes: 6876ca311bfca5d7 ("gpio: mxs: add COMPILE_TEST support for GPIO_MXS")
Cc: <stable@vger.kernel.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpio/Kconfig

index f20ac3d..14751c7 100644 (file)
@@ -428,8 +428,9 @@ config GPIO_MXC
        select GENERIC_IRQ_CHIP
 
 config GPIO_MXS
-       def_bool y
+       bool "Freescale MXS GPIO support" if COMPILE_TEST
        depends on ARCH_MXS || COMPILE_TEST
+       default y if ARCH_MXS
        select GPIO_GENERIC
        select GENERIC_IRQ_CHIP