Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3556145pxb; Mon, 24 Jan 2022 12:08:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJxnlXBeDbmKouJ1Y2RPfHstrQYN4MhSZ0aFEzAfC3vD87I61X6LyWQhmsfIEoIe2Zus97Qq X-Received: by 2002:a17:902:9a0a:b0:149:7da0:af27 with SMTP id v10-20020a1709029a0a00b001497da0af27mr15606934plp.49.1643054899959; Mon, 24 Jan 2022 12:08:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643054899; cv=none; d=google.com; s=arc-20160816; b=k6yZTS1f9J9ZCBpfSYGxky5Z+0jUINCu077YpbksC8li8Ipdm9BISLw7oseF4DaJNE M901YrKaTEyKAVTWyvwHdSK+KOP2DM6KPQVsXJ5sdEV/3osZoZSfDa8m6RtTjZY6lo+X vaglqkT88vkjNyU9Zd2gEzBLZALiu1eFvwIjfBcVOh1MCCu2We9sJF7c1+naVBtDpvLb fiJN2q0JeNk0jxyR4ks7YuMxEXBCbakOcO5w/l6fLar/JVSuRW/oi98rh/jUcuMUgbTg ot6cy9WVFrBA8v9cobjbkow3S45FxWSS45g0KCPbwKH/S6QNY1DUj6gUW655DzNNb0lR 7fkQ== 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=spj/hYGUk4Qi03Si+6HHaDF+xCxyWieYHuFXkVuXh/g=; b=X1iLElUNGqFfNmo3gi+Nty3zQ4zcZhpu6eXqSZxMZRi+Yx54W045VcBqhZMidsNr9j EPBjxnP0PC4eHvZanIhsTMr2B63nCY0Gx8MfCYvBsnSrun0hfHzVM3Y3dGzeBwa7CNvy xAQdTwl7EnRy5LJA6IRYhb3trZkfCes24/ZXxgjhUiYMzT5exk/HmvRHAruqAKEcfagA WOrNAbmXq8J7PCODWg3nsCFnk5fpEinKKdGLS9BN1hQim7TaDmhBaufj5w7ZfkTpWwPI TvBker96rDKyhA4gK19+4f814zYG2NRSa/H/OltPeSGPsWisaZlsWeBlHdgaDLWuzsAy 6WFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=iTnQ6D00; 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 a72si11169198pge.425.2022.01.24.12.08.05; Mon, 24 Jan 2022 12:08:19 -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=iTnQ6D00; 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 S1346016AbiAXTE4 (ORCPT + 99 others); Mon, 24 Jan 2022 14:04:56 -0500 Received: from ams.source.kernel.org ([145.40.68.75]:56126 "EHLO ams.source.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344165AbiAXS6V (ORCPT ); Mon, 24 Jan 2022 13:58:21 -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 E94A4B8122F; Mon, 24 Jan 2022 18:58:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 26A08C340E5; Mon, 24 Jan 2022 18:58:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643050698; bh=+0PMCPFJn7nX+bXhEzg0RONY2GIh1YcE9doSXyviagA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=iTnQ6D00rw2cKE0/1U+7ujWlhFa98V8fKTRMrejd0ceHu5LzeQRnT9mNOlIP/Nu46 BuQ4I3tZNPJCDaanz7vQhAZeFlVosc0DOLDga+SN9TD5iFrY7u1+IjGdZBA9mw0N0R IW0ipgYfSIJ72WfuF7VPvhM9wfrk4N0LiQjJx2uI= 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 4.9 077/157] HID: apple: Do not reset quirks when the Fn key is not found Date: Mon, 24 Jan 2022 19:42:47 +0100 Message-Id: <20220124183935.228809192@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124183932.787526760@linuxfoundation.org> References: <20220124183932.787526760@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 149902619cbc8..0074091c27aa2 100644 --- a/drivers/hid/hid-apple.c +++ b/drivers/hid/hid-apple.c @@ -390,7 +390,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