summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/intel/wmi/thunderbolt.c
diff options
context:
space:
mode:
authorArmin Wolf <W_Armin@gmx.de>2024-02-26 22:35:56 +0300
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2024-03-12 13:47:35 +0300
commita66ccfc2535418b536b1203b65f87c4f501f6bdd (patch)
tree6f6e2c0f2ff5de5e7fd26ef3763ea9fd9ea5d989 /drivers/platform/x86/intel/wmi/thunderbolt.c
parent928439582b3133a5e845ec15ee6eb6838651024f (diff)
downloadlinux-a66ccfc2535418b536b1203b65f87c4f501f6bdd.tar.xz
platform/x86: wmi: Do not instantiate older WMI drivers multiple times
Many older WMI drivers cannot be instantiated multiple times for two reasons: - they are using the legacy GUID-based WMI API - they are singletons (with global state) Prevent such WMI drivers from binding to WMI devices with a duplicated GUID, as this would mean that the WMI driver will be instantiated at least two times (one for the original GUID and one for the duplicated GUID). WMI drivers which can be instantiated multiple times can signal this by setting a flag inside struct wmi_driver. Tested on a ASUS Prime B650-Plus. Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20240226193557.2888-2-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>
Diffstat (limited to 'drivers/platform/x86/intel/wmi/thunderbolt.c')
-rw-r--r--drivers/platform/x86/intel/wmi/thunderbolt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/platform/x86/intel/wmi/thunderbolt.c b/drivers/platform/x86/intel/wmi/thunderbolt.c
index e2ad3f46f356..08df560a2c7a 100644
--- a/drivers/platform/x86/intel/wmi/thunderbolt.c
+++ b/drivers/platform/x86/intel/wmi/thunderbolt.c
@@ -63,6 +63,7 @@ static struct wmi_driver intel_wmi_thunderbolt_driver = {
.dev_groups = tbt_groups,
},
.id_table = intel_wmi_thunderbolt_id_table,
+ .no_singleton = true,
};
module_wmi_driver(intel_wmi_thunderbolt_driver);