platform/x86: dell-smbios-wmi: Stop touching WMI device ID
authorArmin Wolf <W_Armin@gmx.de>
Tue, 22 Jul 2025 18:38:41 +0000 (20:38 +0200)
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>
Tue, 12 Aug 2025 12:00:32 +0000 (15:00 +0300)
commitd26a9f4f0a7745f0d5127344379a62007df68dcd
tree4e890cac7b46d7a45d769a31405d04e1bce32def
parent8f5ae30d69d7543eee0d70083daf4de8fe15d585
platform/x86: dell-smbios-wmi: Stop touching WMI device ID

The Dell SMBIOS driver uses the "id" field inside struct device for
prioritizing the WMI backend over the SMM backend. Because of this
the WMI backend modifies the "id" field of the underlying WMI device.
However the WMI core itself uses wdev->dev.id internally to track
device IDs, so modifying this value will result in a resource leak.

Fix this by not using the "id" field inside struct device for SMBIOS
prioritization. Instead extend struct smbios_device with a separate
"priority" field.

Tested on a Dell Inspiron 3505.

Fixes: 73f0f2b52c5e ("platform/x86: wmi: Fix WMI device naming issue")
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20250722183841.9552-1-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
drivers/platform/x86/dell/dell-smbios-base.c
drivers/platform/x86/dell/dell-smbios-smm.c
drivers/platform/x86/dell/dell-smbios-wmi.c
drivers/platform/x86/dell/dell-smbios.h