diff options
author | Armin Wolf <W_Armin@gmx.de> | 2023-11-03 19:25:25 +0100 |
---|---|---|
committer | Hans de Goede <hdegoede@redhat.com> | 2023-11-20 13:20:33 +0100 |
commit | 75c487fcb69c981f9bd21f91e6e3b8b2080d7ab0 (patch) | |
tree | 0307027b48fd907ef42cc210483a332706635a7e /drivers/platform/x86/intel/wmi/sbl-fw-update.c | |
parent | 7275bf3e09578e1761157e7683f2e898c5c235a6 (diff) | |
download | lwn-75c487fcb69c981f9bd21f91e6e3b8b2080d7ab0.tar.gz lwn-75c487fcb69c981f9bd21f91e6e3b8b2080d7ab0.zip |
platform/x86: intel-wmi-sbl-fw-update: Use bus-based WMI interface
Currently, the driver was still using the deprecated GUID-based
interface to query/set data blocks. Use the modern bus-based
interface for this.
Tested with a custom SSDT from the Intel Slim Bootloader project.
Reviewed-by: Jithu Joseph <jithu.joseph@intel.com>
Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20231103182526.3524-3-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/intel/wmi/sbl-fw-update.c')
-rw-r--r-- | drivers/platform/x86/intel/wmi/sbl-fw-update.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/drivers/platform/x86/intel/wmi/sbl-fw-update.c b/drivers/platform/x86/intel/wmi/sbl-fw-update.c index 3c86e0108a24..9cf5ed0f8dc2 100644 --- a/drivers/platform/x86/intel/wmi/sbl-fw-update.c +++ b/drivers/platform/x86/intel/wmi/sbl-fw-update.c @@ -25,18 +25,13 @@ static int get_fwu_request(struct device *dev, u32 *out) { - struct acpi_buffer result = {ACPI_ALLOCATE_BUFFER, NULL}; union acpi_object *obj; - acpi_status status; - status = wmi_query_block(INTEL_WMI_SBL_GUID, 0, &result); - if (ACPI_FAILURE(status)) { - dev_err(dev, "wmi_query_block failed\n"); + obj = wmidev_block_query(to_wmi_device(dev), 0); + if (!obj) return -ENODEV; - } - obj = (union acpi_object *)result.pointer; - if (!obj || obj->type != ACPI_TYPE_INTEGER) { + if (obj->type != ACPI_TYPE_INTEGER) { dev_warn(dev, "wmi_query_block returned invalid value\n"); kfree(obj); return -EINVAL; @@ -58,7 +53,7 @@ static int set_fwu_request(struct device *dev, u32 in) input.length = sizeof(u32); input.pointer = &value; - status = wmi_set_block(INTEL_WMI_SBL_GUID, 0, &input); + status = wmidev_block_set(to_wmi_device(dev), 0, &input); if (ACPI_FAILURE(status)) { dev_err(dev, "wmi_set_block failed\n"); return -ENODEV; |