diff options
author | Armin Wolf <W_Armin@gmx.de> | 2023-11-03 19:25:26 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-11-20 13:20:33 +0100 |
commit | 2340f12023efa7dc256f496d85d2411ca47cb9a2 (patch) | |
tree | e7c69c4efb63d2630ec2b928b81ca222143ffc2e /drivers/platform/x86 | |
parent | 75c487fcb69c981f9bd21f91e6e3b8b2080d7ab0 (diff) | |
download | linux-stable-2340f12023efa7dc256f496d85d2411ca47cb9a2.tar.gz linux-stable-2340f12023efa7dc256f496d85d2411ca47cb9a2.tar.bz2 linux-stable-2340f12023efa7dc256f496d85d2411ca47cb9a2.zip |
platform/x86/intel/wmi: thunderbolt: Use bus-based WMI interface
Currently, the driver still uses the legacy GUID-based interface
to invoke WMI methods. Use the modern bus-based interface instead.
Tested on a Lenovo E51-80.
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231103182526.3524-4-W_Armin@gmx.de
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r-- | drivers/platform/x86/intel/wmi/thunderbolt.c | 3 | ||||
-rw-r--r-- | drivers/platform/x86/wmi.c | 1 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/platform/x86/intel/wmi/thunderbolt.c b/drivers/platform/x86/intel/wmi/thunderbolt.c index fc333ff82d1e..e2ad3f46f356 100644 --- a/drivers/platform/x86/intel/wmi/thunderbolt.c +++ b/drivers/platform/x86/intel/wmi/thunderbolt.c @@ -32,8 +32,7 @@ static ssize_t force_power_store(struct device *dev, mode = hex_to_bin(buf[0]); dev_dbg(dev, "force_power: storing %#x\n", mode); if (mode == 0 || mode == 1) { - status = wmi_evaluate_method(INTEL_WMI_THUNDERBOLT_GUID, 0, 1, - &input, NULL); + status = wmidev_evaluate_method(to_wmi_device(dev), 0, 1, &input, NULL); if (ACPI_FAILURE(status)) { dev_dbg(dev, "force_power: failed to evaluate ACPI method\n"); return -ENODEV; diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c index 4c4effc883ae..cb7e74f2b009 100644 --- a/drivers/platform/x86/wmi.c +++ b/drivers/platform/x86/wmi.c @@ -107,6 +107,7 @@ static const char * const allow_duplicates[] = { "05901221-D566-11D1-B2F0-00A0C9062910", /* wmi-bmof */ "8A42EA14-4F2A-FD45-6422-0087F7A7E608", /* dell-wmi-ddv */ "44FADEB1-B204-40F2-8581-394BBDC1B651", /* intel-wmi-sbl-fw-update */ + "86CCFD48-205E-4A77-9C48-2021CBEDE341", /* intel-wmi-thunderbolt */ NULL }; |