summaryrefslogtreecommitdiffstats
path: root/drivers/staging/unisys/visorinput
diff options
context:
space:
mode:
authorSameer Wadgaonkar <sameer.wadgaonkar@unisys.com>2017-09-27 13:14:43 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-09-28 11:20:21 +0200
commitcb3b5dccca9d011f764de139f88a1db3b9d21d82 (patch)
treeaa2622b571339a77f8188cc36b6e754430b462e1 /drivers/staging/unisys/visorinput
parent66040f9104fc2898d4a66e94e9e5e2cc11927611 (diff)
staging: unisys: check the whole channel instead of just guid for match
Validate that the channel contents match the channel type that we are matching. Signed-off-by: Sameer Wadgaonkar <sameer.wadgaonkar@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Reviewed-by: Tim Sell <timothy.sell@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/unisys/visorinput')
-rw-r--r--drivers/staging/unisys/visorinput/visorinput.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c
index 1b58663709e6..450f003743c0 100644
--- a/drivers/staging/unisys/visorinput/visorinput.c
+++ b/drivers/staging/unisys/visorinput/visorinput.c
@@ -712,8 +712,9 @@ out:
/* GUIDS for all channel types supported by this driver. */
static struct visor_channeltype_descriptor visorinput_channel_types[] = {
- { VISOR_KEYBOARD_CHANNEL_GUID, "keyboard"},
- { VISOR_MOUSE_CHANNEL_GUID, "mouse"},
+ { VISOR_KEYBOARD_CHANNEL_GUID, "keyboard",
+ sizeof(struct channel_header), 0 },
+ { VISOR_MOUSE_CHANNEL_GUID, "mouse", sizeof(struct channel_header), 0 },
{}
};