Skip to content

Commit f5dd17e

Browse files
Wer-Wolfjwrdegoede
authored andcommitted
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>
1 parent 6ed2d7e commit f5dd17e

1 file changed

Lines changed: 6 additions & 8 deletions

File tree

  • drivers/platform/x86

drivers/platform/x86/wmi.c

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1175,15 +1175,13 @@ static int wmi_notify_device(struct device *dev, void *data)
11751175
}
11761176

11771177
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)
11821180
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+
11871185
up_read(&wblock->notify_lock);
11881186

11891187
kfree(obj);

0 commit comments

Comments
 (0)