Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Input: aiptek - use descriptors of current altsetting

Make sure to always use the descriptors of the current alternate setting
to avoid future issues when accessing fields that may differ between
settings.

Signed-off-by: Johan Hovold <johan@kernel.org>
Acked-by: Vladis Dronov <vdronov@redhat.com>
Link: https://lore.kernel.org/r/20191210113737.4016-4-johan@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>

authored by

Johan Hovold and committed by
Dmitry Torokhov
cfa4f6a9 3111491f

+1 -1
+1 -1
drivers/input/tablet/aiptek.c
··· 1713 1713 1714 1714 aiptek->inputdev = inputdev; 1715 1715 aiptek->intf = intf; 1716 - aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber; 1716 + aiptek->ifnum = intf->cur_altsetting->desc.bInterfaceNumber; 1717 1717 aiptek->inDelay = 0; 1718 1718 aiptek->endDelay = 0; 1719 1719 aiptek->previousJitterable = 0;