Skip to content

Commit 75c487f

Browse files
Wer-Wolfjwrdegoede
authored andcommitted
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>
1 parent 7275bf3 commit 75c487f

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

drivers/platform/x86/intel/wmi/sbl-fw-update.c

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,13 @@
2525

2626
static int get_fwu_request(struct device *dev, u32 *out)
2727
{
28-
struct acpi_buffer result = {ACPI_ALLOCATE_BUFFER, NULL};
2928
union acpi_object *obj;
30-
acpi_status status;
3129

32-
status = wmi_query_block(INTEL_WMI_SBL_GUID, 0, &result);
33-
if (ACPI_FAILURE(status)) {
34-
dev_err(dev, "wmi_query_block failed\n");
30+
obj = wmidev_block_query(to_wmi_device(dev), 0);
31+
if (!obj)
3532
return -ENODEV;
36-
}
3733

38-
obj = (union acpi_object *)result.pointer;
39-
if (!obj || obj->type != ACPI_TYPE_INTEGER) {
34+
if (obj->type != ACPI_TYPE_INTEGER) {
4035
dev_warn(dev, "wmi_query_block returned invalid value\n");
4136
kfree(obj);
4237
return -EINVAL;
@@ -58,7 +53,7 @@ static int set_fwu_request(struct device *dev, u32 in)
5853
input.length = sizeof(u32);
5954
input.pointer = &value;
6055

61-
status = wmi_set_block(INTEL_WMI_SBL_GUID, 0, &input);
56+
status = wmidev_block_set(to_wmi_device(dev), 0, &input);
6257
if (ACPI_FAILURE(status)) {
6358
dev_err(dev, "wmi_set_block failed\n");
6459
return -ENODEV;

drivers/platform/x86/wmi.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,7 @@ MODULE_DEVICE_TABLE(acpi, wmi_device_ids);
106106
static const char * const allow_duplicates[] = {
107107
"05901221-D566-11D1-B2F0-00A0C9062910", /* wmi-bmof */
108108
"8A42EA14-4F2A-FD45-6422-0087F7A7E608", /* dell-wmi-ddv */
109+
"44FADEB1-B204-40F2-8581-394BBDC1B651", /* intel-wmi-sbl-fw-update */
109110
NULL
110111
};
111112

0 commit comments

Comments
 (0)