From patchwork Thu May 25 19:31:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Pearson X-Patchwork-Id: 13255612 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id CA576C7EE29 for ; Thu, 25 May 2023 19:42:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241295AbjEYTmc (ORCPT ); Thu, 25 May 2023 15:42:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240262AbjEYTmb (ORCPT ); Thu, 25 May 2023 15:42:31 -0400 Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13472E62; Thu, 25 May 2023 12:42:06 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2F33A5C0078; Thu, 25 May 2023 15:31:38 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 25 May 2023 15:31:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=squebb.ca; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1685043098; x= 1685129498; bh=MfKBhMsQHnw3DcuLqhPdvyi5pANzNQBNxlUGbArluSQ=; b=N zjwyF8/NZVcWC9raID22jjq1rEnuRXJgOz+KOLpSP81sNLD5JUzIXUdDXqYu/tpY OUehGu/GhsEqWXmCOGwkU+GE+LptCPsRcxXIbMxwEOgRwXpjxMFNcKvTyiLyJQBF vHDJOARp6yPN7ZzQh+/0Jx0MYmSpRUZloNnauEw9sx7YlIJN7W4RwtRVXQxePyAi zqFQuYKVdq8LELuOZOxCnQLsoTVlkYe/far1/yyUP1EPpiufXlCzo07rdqE7F1oZ 3uaG/WJtSvglShPvAaDMY93/TgYQVuyFVT0J09fpL8VafGtC6E3ILAIkuIVRCOXQ 5ZM4o3DuXnySTfaci/78A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1685043098; x= 1685129498; bh=MfKBhMsQHnw3DcuLqhPdvyi5pANzNQBNxlUGbArluSQ=; b=K 44SYzU4yCcDsy0bX7VZOQAsqpsaJPlfBB0YB4im6Z2PU/TWVmSPr1Bxly3OmTVr6 eSlU93cNvv/hFPv3V2Moi7mVOrgicgJ7yrte7hk9a8ZTrKWhFujWazlSYB8Tbglf 8VGRNT/o0RffZ+QXu6BXqc3XhHBAryW2+OuwavFwSieuZFWcVcB81cax20vTPZG6 5326P2Oe81sD1nx6y8lqZmjNchLJehf1cJwO7Q65GptNLFoGXuG2S5nepyQtmgGc AEOFk6L1FIlivTx6jPhWyiUgLAcp1QiGYUoXcmGeJBjspuGgCZSl1ERfvwIwR6LY a4ziOURcy1X3lcs3E4Dwg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeejjedgudefjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecuogetfedtuddqtdduucdludehmdenucfjughrpe fhvfevufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpeforghrkhcurfgvrghr shhonhcuoehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggrqeenucggtf frrghtthgvrhhnpeeftddvjeefleffvefhgfejjeehudetteeigeeugfekhffhgeejudeu teehgfdvffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehmphgvrghrshhonhdqlhgvnhhovhhosehsqhhuvggssgdrtggr X-ME-Proxy: Feedback-ID: ibe194615:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 25 May 2023 15:31:37 -0400 (EDT) From: Mark Pearson To: mpearson-lenovo@squebb.ca Cc: hdegoede@redhat.com, markgross@kernel.org, platform-driver-x86@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/5] platform/x86: think-lmi: Don't display unnecessary authentication settings Date: Thu, 25 May 2023 15:31:31 -0400 Message-Id: <20230525193132.3727-4-mpearson-lenovo@squebb.ca> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230525193132.3727-1-mpearson-lenovo@squebb.ca> References: <20230525193132.3727-1-mpearson-lenovo@squebb.ca> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: platform-driver-x86@vger.kernel.org If Opcode support is available (which is the standard for all platforms going forward) then there is no need to have the encoding and kbdlang attributes visible Signed-off-by: Mark Pearson --- Changes in V2: None. Version bumped in series drivers/platform/x86/think-lmi.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c index 1c02958035ad..64cd453d6e7d 100644 --- a/drivers/platform/x86/think-lmi.c +++ b/drivers/platform/x86/think-lmi.c @@ -879,6 +879,12 @@ static umode_t auth_attr_is_visible(struct kobject *kobj, return 0; } + /* Don't display un-needed settings if opcode available */ + if ((attr == &auth_encoding.attr || + attr == &auth_kbdlang.attr) && + tlmi_priv.opcode_support) + return 0; + return attr->mode; }