diff options
author | Mark Pearson <mpearson-lenovo@squebb.ca> | 2023-06-01 23:05:52 +0300 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-06-08 12:00:17 +0300 |
commit | 7def1d35d4b4a92e33fa665ba1a5a02926be9c3c (patch) | |
tree | 299b7ae718b2aab7a6cedeb6214c9fe29adeb12b /drivers/platform/x86/think-lmi.c | |
parent | 3206001f704ab4dc7dc0ff69209f770680bcf5bf (diff) | |
download | linux-7def1d35d4b4a92e33fa665ba1a5a02926be9c3c.tar.xz |
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 <mpearson-lenovo@squebb.ca>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230601200552.4396-8-mpearson-lenovo@squebb.ca
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86/think-lmi.c')
-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; } |