platform/x86: xiaomi-wmi: Use new buffer-based WMI API

Use the new buffer-based WMI API to avoid having to deal with ACPI
at all.

Signed-off-by: Armin Wolf <W_Armin@gmx.de>
Link: https://patch.msgid.link/20260116204116.4030-8-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>
This commit is contained in:
Armin Wolf 2026-01-16 21:41:14 +01:00 committed by Ilpo Järvinen
parent e210986f52
commit bb7527c63f
No known key found for this signature in database
GPG Key ID: 59AC4F6153E5CE31

View File

@ -1,7 +1,6 @@
// SPDX-License-Identifier: GPL-2.0
/* WMI driver for Xiaomi Laptops */
#include <linux/acpi.h>
#include <linux/device.h>
#include <linux/input.h>
#include <linux/module.h>
@ -56,7 +55,7 @@ static int xiaomi_wmi_probe(struct wmi_device *wdev, const void *context)
return input_register_device(data->input_dev);
}
static void xiaomi_wmi_notify(struct wmi_device *wdev, union acpi_object *dummy)
static void xiaomi_wmi_notify(struct wmi_device *wdev, const struct wmi_buffer *dummy)
{
struct xiaomi_wmi *data = dev_get_drvdata(&wdev->dev);
@ -85,7 +84,7 @@ static struct wmi_driver xiaomi_wmi_driver = {
},
.id_table = xiaomi_wmi_id_table,
.probe = xiaomi_wmi_probe,
.notify = xiaomi_wmi_notify,
.notify_new = xiaomi_wmi_notify,
.no_singleton = true,
};
module_wmi_driver(xiaomi_wmi_driver);