Replace one more __builtin_popcount with bitwise test

__builtin_popcount might not be available and in this case, a bitwise-and
can accomplish the same task.

Signed-off-by: Michael Forney <mforney@mforney.org>
This commit is contained in:
Michael Forney 2019-06-16 19:37:37 -07:00
parent 552d5aeba5
commit 9c89ab6d95

View file

@ -1735,7 +1735,7 @@ tablet_update_tool_state(struct tablet_dispatch *tablet,
/* Kernel tools are supposed to be mutually exclusive, if we have
* two set discard the most recent one. */
if (__builtin_popcount(tablet->tool_state) > 1) {
if (tablet->tool_state & (tablet->tool_state - 1)) {
evdev_log_bug_kernel(device,
"Multiple tools active simultaneously (%#x)\n",
tablet->tool_state);