Skip to content

Commit f400991

Browse files
Jiri Slabygregkh
authored andcommitted
vt: switch vt_dont_switch to bool
vt_dont_switch is pure boolean, no need for whole char. Signed-off-by: Jiri Slaby <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9256d09 commit f400991

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/tty/vt/vt_ioctl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
#include <linux/kbd_diacr.h>
4040
#include <linux/selection.h>
4141

42-
char vt_dont_switch;
42+
bool vt_dont_switch;
4343

4444
static inline bool vt_in_use(unsigned int i)
4545
{
@@ -1026,12 +1026,12 @@ int vt_ioctl(struct tty_struct *tty,
10261026
case VT_LOCKSWITCH:
10271027
if (!capable(CAP_SYS_TTY_CONFIG))
10281028
return -EPERM;
1029-
vt_dont_switch = 1;
1029+
vt_dont_switch = true;
10301030
break;
10311031
case VT_UNLOCKSWITCH:
10321032
if (!capable(CAP_SYS_TTY_CONFIG))
10331033
return -EPERM;
1034-
vt_dont_switch = 0;
1034+
vt_dont_switch = false;
10351035
break;
10361036
case VT_GETHIFONTMASK:
10371037
ret = put_user(vc->vc_hi_font_mask,

include/linux/vt_kern.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ extern int do_unbind_con_driver(const struct consw *csw, int first, int last,
135135
int deflt);
136136
int vty_init(const struct file_operations *console_fops);
137137

138-
extern char vt_dont_switch;
138+
extern bool vt_dont_switch;
139139
extern int default_utf8;
140140
extern int global_cursor_default;
141141

0 commit comments

Comments
 (0)