platform/x86: hp-wmi: Refactor dock and tablet state fetchers
authorDarren Hart (VMware) <dvhart@infradead.org>
Thu, 20 Apr 2017 00:03:38 +0000 (17:03 -0700)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 20 Apr 2017 20:26:16 +0000 (13:26 -0700)
commitf9cf3b2880cc41ec2b44aa24fa156bffe934f9c7
tree890f1ce87fd763d68a330edd54c3e124c81bf12d
parentc7ef144c12033052c956ca9d80b2dfc19c73d939
platform/x86: hp-wmi: Refactor dock and tablet state fetchers

Both dock and tablet use the HPWMI_HARDWARE_QUERY, but require different
masks. Rather than using two functions with magic masks, define the
masks, and use a common accessor.

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