From: Anshul Garg Date: Thu, 25 Jun 2015 20:33:12 +0000 (-0700) Subject: Input: use for_each_set_bit() where appropriate X-Git-Tag: omap-for-v4.3/legacy-v2-signed~45^2^2~6 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3e2b03dad54bbcab5be948629a644d55ce7b5a2e;p=pandora-kernel.git Input: use for_each_set_bit() where appropriate 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 Signed-off-by: Dmitry Torokhov --- Reading git-diff-tree failed