From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 76041C35247 for ; Mon, 3 Feb 2020 16:39:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4A4662051A for ; Mon, 3 Feb 2020 16:39:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580747976; bh=3n72pU4WVZkfE6e7Hsg0eDUU0ly95MhHTPzCc1hSGTs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rT5yTJ9Lwb77XK3pUisoT9rS1WMBiDAqGDqvxAbfRMwjdrWMp6Em2wboR7wuyzzCF H87t+sc4EmMhSuH2j6EptyRQQKMpRQ2HMzIcwA3zZpPs9m0+zDaQt4vadZhTcdjZqp ceEwoJexah8zUFwT723mPVfiBlLzOxyK3SAG0+Tw= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731344AbgBCQhd (ORCPT ); Mon, 3 Feb 2020 11:37:33 -0500 Received: from mail.kernel.org ([198.145.29.99]:53044 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730890AbgBCQh3 (ORCPT ); Mon, 3 Feb 2020 11:37:29 -0500 Received: from localhost (unknown [104.132.45.99]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E238F2087E; Mon, 3 Feb 2020 16:37:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580747849; bh=3n72pU4WVZkfE6e7Hsg0eDUU0ly95MhHTPzCc1hSGTs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EoIxNjq2WXpbRc5zyQZn/2CVV6gTtT8gm8a+u/fvbWV3q/pcwThslQyCtVPtcqhYf zBfNPEkl6/lc39oq+CNueAuTH2LMDF89IEym4NcdFFLJr3lGbx5phAku77S1F8WQ4u SY2V4z/kuQaPamfHCIOpP2DcVEXuh0O6QTF41Wa4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Vladis Dronov , Dmitry Torokhov , Sasha Levin Subject: [PATCH 5.4 65/90] Input: aiptek - use descriptors of current altsetting Date: Mon, 3 Feb 2020 16:20:08 +0000 Message-Id: <20200203161925.451117468@linuxfoundation.org> X-Mailer: git-send-email 2.25.0 In-Reply-To: <20200203161917.612554987@linuxfoundation.org> References: <20200203161917.612554987@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Johan Hovold [ Upstream commit cfa4f6a99fb183742cace65ec551b444852b8ef6 ] 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 Acked-by: Vladis Dronov Link: https://lore.kernel.org/r/20191210113737.4016-4-johan@kernel.org Signed-off-by: Dmitry Torokhov Signed-off-by: Sasha Levin --- drivers/input/tablet/aiptek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/tablet/aiptek.c b/drivers/input/tablet/aiptek.c index 06d0ffef4a171..e08b0ef078e81 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; -- 2.20.1