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 14:34:36 +0000 (16:34 +0200)
commit56676fb5e9e61aa216759cf05fb55edd45a67c14
treea20f9b73ac1f1684cf2cff5721dc72235d249d8a
parent8ad73f9e86bdb079043868e3543d302b57068b80
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