Skip to content

Commit

Permalink
vt: switch vt_dont_switch to bool
Browse files Browse the repository at this point in the history
commit f400991 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>
  • Loading branch information
Jiri Slaby authored and Greg Kroah-Hartman committed Apr 2, 2020
1 parent 270db03 commit e50d4c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions drivers/tty/vt/vt_ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion include/linux/vt_kern.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ extern int do_unbind_con_driver(const struct consw *csw, int first, int last,
int deflt);
int vty_init(const struct file_operations *console_fops);

extern char vt_dont_switch;
extern bool vt_dont_switch;
extern int default_utf8;
extern int global_cursor_default;

Expand Down

0 comments on commit e50d4c4

Please sign in to comment.