summaryrefslogtreecommitdiff
path: root/drivers/platform
diff options
context:
space:
mode:
authorArmin Wolf <W_Armin@gmx.de>2024-09-01 05:10:53 +0200
committerHans de Goede <hdegoede@redhat.com>2024-09-05 17:21:59 +0200
commit79a56f4c8fa629ac79ada8f4b746195bd91f09c7 (patch)
treef376bcf61afb8cf7a9a5b16f8e82ceddcae935ab /drivers/platform
parente04e2b760ddbe3d7b283a05898c3a029085cd8cd (diff)
downloadlwn-79a56f4c8fa629ac79ada8f4b746195bd91f09c7.tar.gz
lwn-79a56f4c8fa629ac79ada8f4b746195bd91f09c7.zip
platform/x86: wmi: Remove wmi_get_event_data()
Since the WMI driver core now takes care of retrieving the WMI event data even for legacy WMI notify handlers, this function is no longer used. Remove it to prevent WMI drivers from messing up the ACPI firmware on some machines. Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Armin Wolf <W_Armin@gmx.de> Link: https://lore.kernel.org/r/20240901031055.3030-4-W_Armin@gmx.de Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform')
-rw-r--r--drivers/platform/x86/wmi.c57
1 files changed, 0 insertions, 57 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 6ab181dd94ab..c7f0754f74b4 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -199,23 +199,6 @@ static int wmidev_match_guid(struct device *dev, const void *data)
return 0;
}
-static int wmidev_match_notify_id(struct device *dev, const void *data)
-{
- struct wmi_block *wblock = dev_to_wblock(dev);
- const u32 *notify_id = data;
-
- /* Legacy GUID-based functions are restricted to only see
- * a single WMI device for each GUID.
- */
- if (test_bit(WMI_GUID_DUPLICATED, &wblock->flags))
- return 0;
-
- if (wblock->gblock.flags & ACPI_WMI_EVENT && wblock->gblock.notify_id == *notify_id)
- return 1;
-
- return 0;
-}
-
static const struct bus_type wmi_bus_type;
static struct wmi_device *wmi_find_device_by_guid(const char *guid_string)
@@ -235,17 +218,6 @@ static struct wmi_device *wmi_find_device_by_guid(const char *guid_string)
return dev_to_wdev(dev);
}
-static struct wmi_device *wmi_find_event_by_notify_id(const u32 notify_id)
-{
- struct device *dev;
-
- dev = bus_find_device(&wmi_bus_type, NULL, &notify_id, wmidev_match_notify_id);
- if (!dev)
- return ERR_PTR(-ENODEV);
-
- return to_wmi_device(dev);
-}
-
static void wmi_device_put(struct wmi_device *wdev)
{
put_device(&wdev->dev);
@@ -650,35 +622,6 @@ acpi_status wmi_remove_notify_handler(const char *guid)
EXPORT_SYMBOL_GPL(wmi_remove_notify_handler);
/**
- * wmi_get_event_data - Get WMI data associated with an event (deprecated)
- *
- * @event: Event to find
- * @out: Buffer to hold event data
- *
- * Get extra data associated with an WMI event, the caller needs to free @out.
- *
- * Return: acpi_status signaling success or error.
- */
-acpi_status wmi_get_event_data(u32 event, struct acpi_buffer *out)
-{
- struct wmi_block *wblock;
- struct wmi_device *wdev;
- acpi_status status;
-
- wdev = wmi_find_event_by_notify_id(event);
- if (IS_ERR(wdev))
- return AE_NOT_FOUND;
-
- wblock = container_of(wdev, struct wmi_block, dev);
- status = get_event_data(wblock, out);
-
- wmi_device_put(wdev);
-
- return status;
-}
-EXPORT_SYMBOL_GPL(wmi_get_event_data);
-
-/**
* wmi_has_guid - Check if a GUID is available
* @guid_string: 36 char string of the form fa50ff2b-f2e8-45de-83fa-65417f2f49ba
*