x86 platform drivers: hp-wmi Reorder event id processing
authorThomas Renninger <trenn@suse.de>
Fri, 21 May 2010 14:18:09 +0000 (16:18 +0200)
committerMatthew Garrett <mjg@redhat.com>
Tue, 3 Aug 2010 13:48:40 +0000 (09:48 -0400)
commit751ae808f6b29803228609f51aa1ae057f5c576e
treecc0906d31b8968c99822061924c5d0d799239b5f
parent4b30fbca4f64bc70c59867ad5769c37efb587ff4
x86 platform drivers: hp-wmi Reorder event id processing

Event id 0x4 defines the hotkey event.
No need (or even wrong) to query HPWMI_HOTKEY_QUERY if event id is != 0x4.

Reorder the eventcode conditionals and use switch case instead of if/else.
Use an enum for the event ids cases.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
CC: linux-acpi@vger.kernel.org
CC: platform-driver-x86@vger.kernel.org
drivers/platform/x86/hp-wmi.c