Commit 7def1d35 authored by Mark Pearson's avatar Mark Pearson Committed by Hans de Goede
Browse files

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: default avatarMark Pearson <mpearson-lenovo@squebb.ca>
Reviewed-by: default avatarIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: default avatarHans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/r/20230601200552.4396-8-mpearson-lenovo@squebb.ca


Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
parent 3206001f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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;
}