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 15:20:39 +0000 (17:20 +0200)
commitfc3d6dd88e21c84550aa807d4cb1182bd161f383
tree0573033c99ad818be8dc1be0a56ba6a65c4b39bb
parent2839f7afb8cc9f949070bd5b510d3de37c8084a7
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>
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