vt: selection, introduce vc_is_sel
authorJiri Slaby <jslaby@suse.cz>
Wed, 19 Feb 2020 07:39:43 +0000 (08:39 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2020 13:11:00 +0000 (15:11 +0200)
commit383c71b7314f407815e71d6aa09d594ebe46e14c
treedca75a6dd80457d9376d8155a439f9ace5f3919b
parent125dd8c48b1970360884140886b2a6d5b6b47a3f
vt: selection, introduce vc_is_sel

commit dce05aa6eec977f1472abed95ccd71276b9a3864 upstream.

Avoid global variables (namely sel_cons) by introducing vc_is_sel. It
checks whether the parameter is the current selection console. This will
help putting sel_cons to a struct later.

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