Skip to content

Commit 7def1d3

Browse files
mrhpearsonjwrdegoede
authored andcommitted
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]>
1 parent 3206001 commit 7def1d3

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/platform/x86/think-lmi.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -885,6 +885,11 @@ static umode_t auth_attr_is_visible(struct kobject *kobj,
885885
return 0;
886886
}
887887

888+
/* Don't display un-needed settings if opcode available */
889+
if ((attr == &auth_encoding.attr || attr == &auth_kbdlang.attr) &&
890+
tlmi_priv.opcode_support)
891+
return 0;
892+
888893
return attr->mode;
889894
}
890895

0 commit comments

Comments
 (0)