aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/intel/smartconnect.c
diff options
context:
space:
mode:
authorArmin Wolf <[email protected]>2024-05-28 20:49:02 +0000
committerHans de Goede <[email protected]>2024-06-03 09:53:54 +0000
commit1981b296f858010eae409548fd297659b2cc570e (patch)
treee491a7b5a6476885c15b1373d2dcdd3e8d92ce1c /drivers/platform/x86/intel/smartconnect.c
parentplatform/x86: yt2-1380: add CONFIG_EXTCON dependency (diff)
downloadkernel-1981b296f858010eae409548fd297659b2cc570e.tar.gz
kernel-1981b296f858010eae409548fd297659b2cc570e.zip
platform/x86: dell-smbios: Fix wrong token data in sysfs
When reading token data from sysfs on my Inspiron 3505, the token locations and values are wrong. This happens because match_attribute() blindly assumes that all entries in da_tokens have an associated entry in token_attrs. This however is not true as soon as da_tokens[] contains zeroed token entries. Those entries are being skipped when initialising token_attrs, breaking the core assumption of match_attribute(). Fix this by defining an extra struct for each pair of token attributes and use container_of() to retrieve token information. Tested on a Dell Inspiron 3050. Fixes: 33b9ca1e53b4 ("platform/x86: dell-smbios: Add a sysfs interface for SMBIOS tokens") Signed-off-by: Armin Wolf <[email protected]> Reviewed-by: Ilpo Järvinen <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
Diffstat (limited to 'drivers/platform/x86/intel/smartconnect.c')
0 files changed, 0 insertions, 0 deletions