summaryrefslogtreecommitdiff
path: root/drivers/platform/x86
diff options
context:
space:
mode:
authorArmin Wolf <W_Armin@gmx.de>2024-09-01 05:10:55 +0200
committerHans de Goede <hdegoede@redhat.com>2024-09-05 17:21:59 +0200
commitf5dd17e30a59791ba3523aeaab04bafe001b7f67 (patch)
tree43dea8d70f5fc4ee339e11c104d5f20f5600bc55 /drivers/platform/x86
parent6ed2d7e8e74de49f11f9517f32acada5369fd30b (diff)
downloadlwn-f5dd17e30a59791ba3523aeaab04bafe001b7f67.tar.gz
lwn-f5dd17e30a59791ba3523aeaab04bafe001b7f67.zip
platform/x86: wmi: Call both legacy and WMI driver notify handlers
Since the legacy WMI notify handlers are now using the WMI event data provided by the WMI driver core, they can coexist with modern WMI driver notify handlers. Remove the precedence of WMI driver notify handlers and call both when receiving an event. 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-6-W_Armin@gmx.de Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Diffstat (limited to 'drivers/platform/x86')
-rw-r--r--drivers/platform/x86/wmi.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
index 6b27833ba5d9..3cbe180c3fc0 100644
--- a/drivers/platform/x86/wmi.c
+++ b/drivers/platform/x86/wmi.c
@@ -1175,15 +1175,13 @@ static int wmi_notify_device(struct device *dev, void *data)
}
down_read(&wblock->notify_lock);
- /* The WMI driver notify handler conflicts with the legacy WMI handler.
- * Because of this the WMI driver notify handler takes precedence.
- */
- if (wblock->dev.dev.driver && wblock->driver_ready) {
+
+ if (wblock->dev.dev.driver && wblock->driver_ready)
wmi_notify_driver(wblock, obj);
- } else {
- if (wblock->handler)
- wblock->handler(obj, wblock->handler_data);
- }
+
+ if (wblock->handler)
+ wblock->handler(obj, wblock->handler_data);
+
up_read(&wblock->notify_lock);
kfree(obj);