Skip to content
Commit 12415535 authored by Gabor Juhos's avatar Gabor Juhos Committed by Greg Kroah-Hartman
Browse files

tty: ar933x_uart: use config_enabled() macro to clean up ifdefs



Add a new ar933x_uart_console_enabled() helper function
which uses the config_enable(CONFIG_SERIAL_AR933X_CONSOLE)
macro to decide if the console support is enabled or not.

Remove the 'ifdef CONFIG_SERIAL_AR933X_CONSOLE' statements
and use the new helper function to conditionally enable
console support instead.

If CONFIG_SERIAL_AR933X_CONSOLE is not enabled, the new
helper function will become a null stub which allows the
compiler to optimize out the unused console specific
functions/variables.

Signed-off-by: default avatarGabor Juhos <juhosg@openwrt.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 0710e562
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment