platform/x86: hp-wmi: Standardize enum usage for constants
authorDarren Hart (VMware) <dvhart@infradead.org>
Wed, 19 Apr 2017 22:42:01 +0000 (15:42 -0700)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 20 Apr 2017 20:26:08 +0000 (13:26 -0700)
commitd8193cff33906e24ac1830ecb2ca95833d058a3a
tree1d2789be4866beab603911a8eee944248f865b46
parent3bf9310a573d923483526b25c6ec32233748a989
platform/x86: hp-wmi: Standardize enum usage for constants

Use enums consistently throughout the hp-wmi driver for groups of
related constants. Use hex and align the assignment within groups. Move
the *QUERY constants into an enum, create a new enum defining the READ,
WRITE, and ODM constants and use them instead of 0 and 1 at the call
sites. Set the command directly instead of using the ternary operator
since both 1 and 3 as previously documented would result in the command
being set to 0x2.

Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
Tested-by: Carlo Caione <carlo@endlessm.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
drivers/platform/x86/hp-wmi.c