summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPavel Machek <pavel@denx.de>2019-09-24 10:32:44 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-10-04 15:11:25 +0200
commit530c4ba3fa05bf121b87b13befc2f5a7e97cea15 (patch)
treedd522d9586cd69de11ba69ccd773dee68af4844e
parentc791fc76bc72320135fa79368d70005424016de2 (diff)
tty_ldisc: simplify tty_ldisc_autoload initialization
We have got existing macro to check for CONFIG option, use it. Signed-off-by: Pavel Machek <pavel@denx.de> Link: https://lore.kernel.org/r/20190924083244.GA4344@amd Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/tty_ldisc.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/tty/tty_ldisc.c b/drivers/tty/tty_ldisc.c
index 4c49f53afa3e..ec1f6a48121e 100644
--- a/drivers/tty/tty_ldisc.c
+++ b/drivers/tty/tty_ldisc.c
@@ -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)
{