From: Mark Pearson <mpearson-lenovo@squebb.ca>
To: mpearson-lenovo@squebb.ca
Cc: hdegoede@redhat.com, markgross@kernel.org,
platform-driver-x86@vger.kernel.org,
linux-kernel@vger.kernel.org, ilpo.jarvinen@linux.intel.com
Subject: [PATCH v4 8/8] platform/x86: think-lmi: Don't display unnecessary authentication settings
Date: Thu, 1 Jun 2023 16:05:52 -0400 [thread overview]
Message-ID: <20230601200552.4396-8-mpearson-lenovo@squebb.ca> (raw)
In-Reply-To: <20230601200552.4396-1-mpearson-lenovo@squebb.ca>
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 <mpearson-lenovo@squebb.ca>
---
Changes in v2 & v3:
- None. Version bumped in series.
Changes in v4:
- Fixed code alignment as requested.
- This patch was previously #4 and is now #8 in series.
drivers/platform/x86/think-lmi.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/platform/x86/think-lmi.c b/drivers/platform/x86/think-lmi.c
index 2aaaee879488..52d1ce8dfe44 100644
--- a/drivers/platform/x86/think-lmi.c
+++ b/drivers/platform/x86/think-lmi.c
@@ -885,6 +885,11 @@ 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;
}
--
2.40.1
next prev parent reply other threads:[~2023-06-01 20:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-06-01 20:05 [PATCH v4 1/8] platform/x86: think-lmi: mutex protection around multiple WMI calls Mark Pearson
2023-06-01 20:05 ` [PATCH v4 2/8] platform/x86: think-lmi: Enable opcode support on BIOS settings Mark Pearson
2023-06-01 20:05 ` [PATCH v4 3/8] platform/x86: think-lmi: Correct System password interface Mark Pearson
2023-06-01 20:05 ` [PATCH v4 4/8] platform/x86: think-lmi: Update password attribute comments Mark Pearson
2023-06-01 20:05 ` [PATCH v4 5/8] platform/x86: think-lmi: Update password fields to use BIT Mark Pearson
2023-06-01 20:05 ` [PATCH v4 6/8] platform/x86: think-lmi: Correct NVME password handling Mark Pearson
2023-06-01 20:05 ` [PATCH v4 7/8] platform/x86: think-lmi: Correct NVME index default Mark Pearson
2023-06-01 20:05 ` Mark Pearson [this message]
2023-06-02 11:12 ` [PATCH v4 8/8] platform/x86: think-lmi: Don't display unnecessary authentication settings Ilpo Järvinen
2023-06-02 14:58 ` Mark Pearson
2023-06-06 9:33 ` [PATCH v4 1/8] platform/x86: think-lmi: mutex protection around multiple WMI calls Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230601200552.4396-8-mpearson-lenovo@squebb.ca \
--to=mpearson-lenovo@squebb.ca \
--cc=hdegoede@redhat.com \
--cc=ilpo.jarvinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=markgross@kernel.org \
--cc=platform-driver-x86@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox