Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 948cea14 authored by Anshul Garg's avatar Anshul Garg Committed by Dmitry Torokhov
Browse files

Input: ff-core - use for_each_set_bit where appropriate



Use for_each_set_bit to check for set bits in bitmap
as it is more efficient than checking individual bits.

Signed-off-by: default avatarAnshul Garg <aksgarg1989@gmail.com>
Signed-off-by: default avatarDmitry Torokhov <dmitry.torokhov@gmail.com>
parent f23487cd
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -343,8 +343,7 @@ int input_ff_create(struct input_dev *dev, unsigned int max_effects)
	__set_bit(EV_FF, dev->evbit);

	/* Copy "true" bits into ff device bitmap */
	for (i = 0; i <= FF_MAX; i++)
		if (test_bit(i, dev->ffbit))
	for_each_set_bit(i, dev->ffbit, FF_CNT)
		__set_bit(i, ff->ffbit);

	/* we can emulate RUMBLE with periodic effects */