platform/x86: fujitsu-laptop: Simplify soft key handling
authorDarren Hart (VMware) <dvhart@infradead.org>
Fri, 23 Mar 2018 01:11:22 +0000 (18:11 -0700)
committerDarren Hart (VMware) <dvhart@infradead.org>
Thu, 19 Apr 2018 23:25:54 +0000 (16:25 -0700)
commitde15b94f87d1e55c51e45127d761ebfab000232e
tree4478014c1aea73cd9522edf3cc345c54b741f511
parent60cc43fc888428bb2f18f08997432d426a243338
platform/x86: fujitsu-laptop: Simplify soft key handling

The hardcoded BIT(X) used in the soft key handling can be confusing and
prone to errors.

Instead, use the status FLAG_* defines for the sparse keymap index.
Rather than check for each known bit, use a bitmask to filter for all
known soft keys, and use the for_each_set_bit iterator.

Cc: Jan-Marek Glogowski <glogow@fbihome.de>
Cc: Michał Kępień <kernel@kempniu.pl>
Reviewed-by: Jonathan Woithe <jwoithe@just42.net>
Signed-off-by: Darren Hart (VMware) <dvhart@infradead.org>
drivers/platform/x86/fujitsu-laptop.c