diff options
author | Johan Hovold <johan@kernel.org> | 2020-01-10 11:59:52 -0800 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2020-01-10 14:42:56 -0800 |
commit | cfa4f6a99fb183742cace65ec551b444852b8ef6 (patch) | |
tree | 51b8568e9b458692b5fb3d4528341940112aebfa /drivers/input | |
parent | 3111491fca4f01764e0c158c5e0f7ced808eef51 (diff) | |
download | linux-cfa4f6a99fb183742cace65ec551b444852b8ef6.tar.bz2 |
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>
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/tablet/aiptek.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 06d0ffef4a17..e08b0ef078e8 100644 --- a/drivers/input/tablet/aiptek.c +++ b/drivers/input/tablet/aiptek.c @@ -1713,7 +1713,7 @@ aiptek_probe(struct usb_interface *intf, const struct usb_device_id *id) aiptek->inputdev = inputdev; aiptek->intf = intf; - aiptek->ifnum = intf->altsetting[0].desc.bInterfaceNumber; + aiptek->ifnum = intf->cur_altsetting->desc.bInterfaceNumber; aiptek->inDelay = 0; aiptek->endDelay = 0; aiptek->previousJitterable = 0; |