Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3573933pxb; Mon, 24 Jan 2022 12:33:43 -0800 (PST) X-Google-Smtp-Source: ABdhPJxntBIonYDMgyM9pHDjyf/5rTiahdHGzCTgSsCwLMbuLjjlz6rfHax8h6wb6AwCInxpfXTX X-Received: by 2002:a05:6a00:a1b:b0:4bc:1c27:8fd8 with SMTP id p27-20020a056a000a1b00b004bc1c278fd8mr15168316pfh.64.1643056422466; Mon, 24 Jan 2022 12:33:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643056422; cv=none; d=google.com; s=arc-20160816; b=jXdbs4Oupa1iqI1lcuRUkxkohY0FoEAsiCLUQJajORVGJbbt86Ik6SNPFk9rlbux0U //mPh0AtEPKMjI2cUctk2IdEyxpckyUyoQQ+bKFsJiWZAZwrdJ2tNYoo+UqJRpWDn2XQ 4S4ooAM8Jz75mqSd7SxfVn3ARacsRd+2BnzEEJeJxvdyJF6KhBsR6IOsmTVwz4rOMtSZ DDoMt90MrKAVMWwK7oeo0N8UiOd7itpALllzEfS1dtNrd+IpFnY8WXkq38seonxwmf27 C9f94HEnyuBy5C2noXx4PobsKUcXHOpwbRaKZADcoULtuAzJaYsRGKYKQcMG99VKAh7O 82xQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=0RF18TlRHJLXAE2OrUHZkKJJDKBrnqj7mbbDxSnl750=; b=M17KNwljsfVGKZ/erJYZZFKGin0AU65EixGNY09OQXyNf49GYkfM5xNjNYlZ0qii4Q tPoDLpbM4MCuJlx/T9ZCchCP2q0CZGyM56APGi5v3PdTqFya06fuHG0hQqVOH8PG9wPQ l+6FstVXbxlut1s1CuHHTdY3otuu8I/jamYt/sZ0xSjIJbqhhY63Y8cOjRO1ke97nZ7f BlcHrAw1+lI6adIVOkQ08Vh4SqfSrpL7vpiATNdzmes8mtCIDEloV6xqSBKMOPEeNz0G bW9M3gq8R6QPrZMyoDj4zUJ1tnyQ2ZdMpbutDJMVANFaKWBh7v4PHq0tg24PoXjXoLVe rwlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=oX05IkfE; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id bg12si12916392plb.505.2022.01.24.12.33.26; Mon, 24 Jan 2022 12:33:42 -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=@linuxfoundation.org header.s=korg header.b=oX05IkfE; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1347068AbiAXTm3 (ORCPT + 99 others); Mon, 24 Jan 2022 14:42:29 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:55684 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1353059AbiAXTcg (ORCPT ); Mon, 24 Jan 2022 14:32:36 -0500 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 ams.source.kernel.org (Postfix) with ESMTPS id 5995FB81239; Mon, 24 Jan 2022 19:32:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7B1E8C340E5; Mon, 24 Jan 2022 19:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643052754; bh=1AC9kSNkKHKjHLUFTivSrUAlNSvN3ie5d3LvlLeVE9I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=oX05IkfEkRBuVElkLlbE7OtBMIVYEqVqyjDz+l3PRLsOpUIPYBC5rESWmGec7FmOu bu1B75JQ1UN0dAothxx6PcaKxgVMt829fC/nDVR1UlwVoGnoZp7gyUUKvjVYEVG1yD BG0PGRs40N9gfL6eFwfAEPJvhjyb6JPXW8KYF5Ow= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, =?UTF-8?q?Jos=C3=A9=20Exp=C3=B3sito?= , Jiri Kosina , Sasha Levin Subject: [PATCH 5.4 162/320] HID: apple: Do not reset quirks when the Fn key is not found Date: Mon, 24 Jan 2022 19:42:26 +0100 Message-Id: <20220124183959.157100886@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183953.750177707@linuxfoundation.org> References: <20220124183953.750177707@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 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 07df64daf7dae..efce31d035ef5 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c @@ -389,7 +389,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