WMI: Cater for multiple events with same GUID
authorColin King <colin.king@canonical.com>
Fri, 19 Nov 2010 15:40:02 +0000 (15:40 +0000)
committerMatthew Garrett <mjg@redhat.com>
Fri, 7 Jan 2011 22:03:41 +0000 (17:03 -0500)
commit58f6425eb92f54943878b0b3f9c1e51f99c2cb72
treeaa4a5083adbf03561b9aee2d36129e0e7a5e2aa9
parent3098064d3b4a9bf9d2855b2a89599ad77695e324
WMI: Cater for multiple events with same GUID

WMI data blocks can contain WMI events with the same GUID but with
different notifiy_ids, for example volume up/down hotkeys.
This patch enables a single event handler to be registered and
unregistered against all events with same GUID but different
notify_ids.  Since an event handler is passed the notify_id of
an event it can can differentiate between the different events.

The patch also ensures we only register and unregister a device per
unique GUID.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/wmi.c