kconfig: Replace defconfig singe-symbol 'if's with 'depends on'

Same deal as in commit eddd98f ("kconfig: Replace some single-symbol
'if's with 'depends on'"), for all symbols defined within defconfig
files. See that commit for an explanation.

Maybe 'if's were used originally to mirror the 'if's in the main Kconfig
files, and then it got copied around by people assuming 'if' must work
differently from 'depends on'. It doesn't match in every spot at least.
Better to keep it simple and just consistently use 'depends on' when
it's a single symbol/choice I think. Helps reinforce that 'if' isn't
magic too.

Verified by printing all Kconfig menu nodes (symbols, choices, menus,
etc.) before and after the change and diffing (should show no
difference).

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2020-02-10 04:18:50 +01:00 committed by Kumar Gala
commit a42a42cd5a
272 changed files with 752 additions and 2949 deletions

View file

@ -48,19 +48,13 @@ endif # I2C_DW
endif # I2C
if SERIAL
config UART_NS16550
default y
endif # SERIAL
if UART_CONSOLE
depends on SERIAL
config UART_NS16550_PORT_1
default y
endif # UART_CONSOLE
depends on UART_CONSOLE
if SPI

View file

@ -26,18 +26,12 @@ endif # GPIO_DW
endif # GPIO
if SERIAL
config UART_NS16550
default y
endif # SERIAL
if UART_CONSOLE
depends on SERIAL
config UART_NS16550_PORT_0
default y
endif # UART_CONSOLE
depends on UART_CONSOLE
endif # BOARD_EMSDP

View file

@ -11,12 +11,9 @@ if GPIO
config GPIO_DW
default y
if GPIO_DW
config GPIO_DW_0
default y
endif # GPIO_DW
depends on GPIO_DW
endif # GPIO

View file

@ -1,8 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
if BOARD_IOTDK
config BOARD
default "iotdk"
endif # BOARD_IOTDK
depends on BOARD_IOTDK

View file

@ -5,12 +5,8 @@ if BOARD_NSIM
config BOARD
default "nsim"
if SERIAL
config UART_NSIM
default y
endif # SERIAL
depends on SERIAL
endif # BOARD_NSIM