Commit 530c4ba3 authored by Pavel Machek's avatar Pavel Machek Committed by Greg Kroah-Hartman

tty_ldisc: simplify tty_ldisc_autoload initialization

We have got existing macro to check for CONFIG option, use it.
Signed-off-by: default avatarPavel Machek <pavel@denx.de>

Link: https://lore.kernel.org/r/20190924083244.GA4344@amdSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c791fc76
......@@ -156,12 +156,7 @@ static void put_ldops(struct tty_ldisc_ops *ldops)
* takes tty_ldiscs_lock to guard against ldisc races
*/
#if defined(CONFIG_LDISC_AUTOLOAD)
#define INITIAL_AUTOLOAD_STATE 1
#else
#define INITIAL_AUTOLOAD_STATE 0
#endif
static int tty_ldisc_autoload = INITIAL_AUTOLOAD_STATE;
static int tty_ldisc_autoload = IS_BUILTIN(CONFIG_LDISC_AUTOLOAD);
static struct tty_ldisc *tty_ldisc_get(struct tty_struct *tty, int disc)
{
......
Markdown is supported
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