diff options
author | Mark Pearson <[email protected]> | 2023-06-01 16:05:52 -0400 |
---|---|---|
committer | Hans de Goede <[email protected]> | 2023-06-08 11:00:17 +0200 |
commit | 7def1d35d4b4a92e33fa665ba1a5a02926be9c3c (patch) | |
tree | 299b7ae718b2aab7a6cedeb6214c9fe29adeb12b | |
parent | 3206001f704ab4dc7dc0ff69209f770680bcf5bf (diff) |
platform/x86: think-lmi: Don't display unnecessary authentication settings
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 <[email protected]>
Reviewed-by: Ilpo Järvinen <[email protected]>
Reviewed-by: Hans de Goede <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Hans de Goede <[email protected]>
-rw-r--r-- | drivers/platform/x86/think-lmi.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; } |