Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Armin Wolf and committed by
Hans de Goede
f5dd17e3 6ed2d7e8

+6 -8
+6 -8
drivers/platform/x86/wmi.c
··· 1175 1175 } 1176 1176 1177 1177 down_read(&wblock->notify_lock); 1178 - /* The WMI driver notify handler conflicts with the legacy WMI handler. 1179 - * Because of this the WMI driver notify handler takes precedence. 1180 - */ 1181 - if (wblock->dev.dev.driver && wblock->driver_ready) { 1178 + 1179 + if (wblock->dev.dev.driver && wblock->driver_ready) 1182 1180 wmi_notify_driver(wblock, obj); 1183 - } else { 1184 - if (wblock->handler) 1185 - wblock->handler(obj, wblock->handler_data); 1186 - } 1181 + 1182 + if (wblock->handler) 1183 + wblock->handler(obj, wblock->handler_data); 1184 + 1187 1185 up_read(&wblock->notify_lock); 1188 1186 1189 1187 kfree(obj);