]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitb3490db7c3e9070c03edcf927e70a5b3806ee50e
tree1d2789be4866beab603911a8eee944248f865b46
parent83b9a528bdee6ad4f4583b4aff1dd39774312e45
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