Skip to content

Commit 2cbd866

Browse files
StefanBruensgregkh
authored andcommitted
platform/x86: hp-wmi: Fix tablet mode detection for convertibles
commit 9968e12 upstream. Commit f9cf3b2 ("platform/x86: hp-wmi: Refactor dock and tablet state fetchers") consolidated the methods for docking and laptop mode detection, but omitted to apply the correct mask for the laptop mode (it always uses the constant for docking). Fixes: f9cf3b2 ("platform/x86: hp-wmi: Refactor dock and tablet state fetchers") Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Cc: Michel Dänzer <michel@daenzer.net> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 191314e commit 2cbd866

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/platform/x86/hp-wmi.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,7 @@ static int hp_wmi_hw_state(int mask)
297297
if (state < 0)
298298
return state;
299299

300-
return state & 0x1;
300+
return !!(state & mask);
301301
}
302302

303303
static int __init hp_wmi_bios_2008_later(void)

0 commit comments

Comments
 (0)