Skip to content

Commit

Permalink
platform/x86: think-lmi: Don't display unnecessary authentication set…
Browse files Browse the repository at this point in the history
…tings

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>
  • Loading branch information
mrhpearson authored and jwrdegoede committed Jun 8, 2023
1 parent 3206001 commit 7def1d3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions drivers/platform/x86/think-lmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 7def1d3

Please sign in to comment.