git.openpandora.org
/
pandora-kernel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3e30c11
)
Input: use for_each_set_bit() where appropriate
author
Anshul Garg
<aksgarg1989@gmail.com>
Thu, 25 Jun 2015 20:33:12 +0000
(13:33 -0700)
committer
Dmitry Torokhov
<dmitry.torokhov@gmail.com>
Thu, 25 Jun 2015 21:44:36 +0000
(14:44 -0700)
Instead of iterating over all bits in a bitmap and test them individually
let's siwtch to for_each_set_bit() which is more compact and is also
faster.
Also use bitmap_weight() when counting number of set bits.
This also fixes INPUT_DO_TOGGLE() implementation as it should have used
*_CNT as the upper boundary, not *_MAX.
Signed-off-by: Anshul Garg <aksgarg1989@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/input.c
patch
|
blob
|
history
diff --cc
drivers/input/input.c
Simple merge