Skip to content

Commit

Permalink
gpio: tegra: don't auto-enable for COMPILE_TEST
Browse files Browse the repository at this point in the history
I stumbled over a build error with COMPILE_TEST and CONFIG_OF
disabled:

drivers/gpio/gpio-tegra.c: In function 'tegra_gpio_probe':
drivers/gpio/gpio-tegra.c:603:9: error: 'struct gpio_chip' has no member named 'of_node'

The problem is that the newly added GPIO_TEGRA Kconfig symbol
does not have a dependency on CONFIG_OF. However, there is another
problem here as the driver gets enabled unconditionally whenever
COMPILE_TEST is set.

This fixes both problems, by making the symbol user-visible
when COMPILE_TEST is set and default-enabled for ARCH_TEGRA=y.

As a side-effect, it is now possible to compile-test a Tegra
kernel with GPIO support disabled, which is harmless.

Signed-off-by: Arnd Bergmann <[email protected]>
Fixes: 4dd4dd1 ("gpio: tegra: Allow compile test")
Signed-off-by: Linus Walleij <[email protected]>
  • Loading branch information
arndb authored and linusw committed Jul 22, 2016
1 parent 92d21ac commit 0bfb85c
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions drivers/gpio/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -402,9 +402,12 @@ config GPIO_TB10X
select OF_GPIO

config GPIO_TEGRA
bool
default y
bool "NVIDIA Tegra GPIO support"
default ARCH_TEGRA
depends on ARCH_TEGRA || COMPILE_TEST
depends on OF
help
Say yes here to support GPIO pins on NVIDIA Tegra SoCs.

config GPIO_TS4800
tristate "TS-4800 DIO blocks and compatibles"
Expand Down

0 comments on commit 0bfb85c

Please sign in to comment.