vt: switch vt_dont_switch to bool
authorJiri Slaby <jslaby@suse.cz>
Wed, 19 Feb 2020 07:39:48 +0000 (08:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2020 13:28:23 +0000 (15:28 +0200)
commit f400991bf872debffb01c46da882dc97d7e3248e upstream.

vt_dont_switch is pure boolean, no need for whole char.

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Link: https://lore.kernel.org/r/20200219073951.16151-6-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/vt/vt_ioctl.c
include/linux/vt_kern.h

index 564238dcb362a3165054bbb96405e61cdb87055e..26f3745943a74bcb8788b799ccd92c8559d163fa 100644 (file)
@@ -39,7 +39,7 @@
 #include <linux/kbd_diacr.h>
 #include <linux/selection.h>
 
-char vt_dont_switch;
+bool vt_dont_switch;
 
 static inline bool vt_in_use(unsigned int i)
 {
@@ -1026,12 +1026,12 @@ int vt_ioctl(struct tty_struct *tty,
        case VT_LOCKSWITCH:
                if (!capable(CAP_SYS_TTY_CONFIG))
                        return -EPERM;
-               vt_dont_switch = 1;
+               vt_dont_switch = true;
                break;
        case VT_UNLOCKSWITCH:
                if (!capable(CAP_SYS_TTY_CONFIG))
                        return -EPERM;
-               vt_dont_switch = 0;
+               vt_dont_switch = false;
                break;
        case VT_GETHIFONTMASK:
                ret = put_user(vc->vc_hi_font_mask,
index 3fd07912909cddc74a30a5d3983d906563017e66..a3de234d3350540e9b46128b1e1452753d99451b 100644 (file)
@@ -142,7 +142,7 @@ static inline bool vt_force_oops_output(struct vc_data *vc)
        return false;
 }
 
-extern char vt_dont_switch;
+extern bool vt_dont_switch;
 extern int default_utf8;
 extern int global_cursor_default;