Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3384669pxb; Mon, 17 Jan 2022 19:14:40 -0800 (PST) X-Google-Smtp-Source: ABdhPJxBZbM8CHOsGSjLIXX29ATHXTcsiqoCnpWTHjq3cQvd9meHYJ4SgDeBO+XvxD7MOBkyRF+a X-Received: by 2002:a63:7144:: with SMTP id b4mr21322734pgn.217.1642475680569; Mon, 17 Jan 2022 19:14:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1642475680; cv=none; d=google.com; s=arc-20160816; b=SM5VTr+0hMmlTDVMYLnvrBiRr7xfmdifeWZO3ctCyIT3/q23vQTiFLyqNB7BigtPm9 g2fVABj7EjhGticrQSPJHhdurzyZjzA19hcshJIen0fA4NVcop5Xq4smrC4wHMsjd41G P2/dOcEaR3b4cPaZYPcqLXW+MC+WqIa+t7XA6i/HUwbPzobxfgLwm9mHiDpM9V/RvOSq oHUe6hKikXleYJQEiff1c85mO4igSKmW+WxAKisN6zFPGpOxas1mEqT8q49ZU/2iLxQu gJSrhdqDPpvTxpQkLKHypyFoqqxEtUqxH1/oZDdubKKcOraZhrtsLeUQ98dGwNritQBV GHnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=rHk6mLSqkTMeNFSM69utrwTium/0IdRJjUL4UKlbgho=; b=HOmrt2D2iL5Kn7bTbIl+17Ff9b6QSerdnYl7WQHY6OxrT86oiVFEMG9eXfFhM3K4QZ uKqBGq0rX2L1K6blbNexim3cUbkg1calttpv514uPGR6kdwuDAgpFt7l2hVrjw+XsfG3 2fFys0hMakp3QHg3fnxp5I0PlR8UX1NjJah0CxQ5+yMCKJ+zbc2KoZDBRlkd1tiZlgei cUHrTHbhwo7JsUZtGyXbcMQYhQaX00p0CVXK50rNu1walrTt5Qa3nPPMve33nMzC4alI 9ISolQyedMYXCiRCD6IIsWVJq0MxnjvtyPTM30RIhounzf056lEp6lQSsZP14IQdz2rt 8f7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ud/NZGx7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id s7si14570444plq.371.2022.01.17.19.14.20; Mon, 17 Jan 2022 19:14:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="ud/NZGx7"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245288AbiARCX2 (ORCPT + 99 others); Mon, 17 Jan 2022 21:23:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S245026AbiARCWa (ORCPT ); Mon, 17 Jan 2022 21:22:30 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F010C061747; Mon, 17 Jan 2022 18:22:30 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9BBED60B01; Tue, 18 Jan 2022 02:22:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3FD20C36AF2; Tue, 18 Jan 2022 02:22:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1642472549; bh=wgi+j8udB1hBs2lDS+VQzIfA/QubZozAoFQHsIgrftA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ud/NZGx7lWL2w+K16fNEZ5oXmewVO71XNp2sHdLnOChKaVMEpWtjCOF2YKmmJm0yG R7xFFB3OmZMvDNt54D+Fab3DN1k2d9avFe/3zCm8AHzaD8t4dRtXhKr6OB1ZYqpI0C ukA3tFhi0n4C/Jzu/PFyMWxJpFOwXLDfGE+nZJ6NKJdUIWug0t1mTC07d/7Sc7ejmb jB8eYisjkMEwdqjOiMYr5e2X27mduFDZgcDvUBoR9nLLH5YZEzzreq/D2AcQLckn+r 4i3/baFcDBHCMuIin3v3AV2knqCIF3zXkW7cB3dzvKmofrakJLTSe4owzML30FINWL rggpz+roTDCuQ== From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= , Jiri Kosina , Sasha Levin , jikos@kernel.org, benjamin.tissoires@redhat.com, linux-input@vger.kernel.org Subject: [PATCH AUTOSEL 5.16 049/217] HID: apple: Do not reset quirks when the Fn key is not found Date: Mon, 17 Jan 2022 21:16:52 -0500 Message-Id: <20220118021940.1942199-49-sashal@kernel.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220118021940.1942199-1-sashal@kernel.org> References: <20220118021940.1942199-1-sashal@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-stable: review X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: José Expósito [ Upstream commit a5fe7864d8ada170f19cc47d176bf8260ffb4263 ] When a keyboard without a function key is detected, instead of removing all quirks, remove only the APPLE_HAS_FN quirk. Signed-off-by: José Expósito Signed-off-by: Jiri Kosina Signed-off-by: Sasha Levin --- drivers/hid/hid-apple.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hid/hid-apple.c b/drivers/hid/hid-apple.c index 2c9c5faa74a97..a4ca5ed00e5f5 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c @@ -428,7 +428,7 @@ static int apple_input_configured(struct hid_device *hdev, if ((asc->quirks & APPLE_HAS_FN) && !asc->fn_found) { hid_info(hdev, "Fn key not found (Apple Wireless Keyboard clone?), disabling Fn key handling\n"); - asc->quirks = 0; + asc->quirks &= ~APPLE_HAS_FN; } return 0; -- 2.34.1