diff options
author | Akinobu Mita <akinobu.mita@gmail.com> | 2010-03-15 00:35:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-17 21:43:47 -0400 |
commit | e5d6151115aee73825c1752aff7cd09adfece839 (patch) | |
tree | 8ae10c1fba5dd52a7ee1a07c21dc3cb2fa742e40 /drivers/char/hpet.c | |
parent | c4af96449e20f9245cf3d904098db508cdebcda8 (diff) |
hpet: use for_each_set_bit()
Replace open-coded loop with for_each_set_bit().
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Clemens Ladisch <clemens@ladisch.de>
Cc: Bob Picco <bob.picco@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r-- | drivers/char/hpet.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c index e481c5938bad..9c5eea3ea4de 100644 --- a/drivers/char/hpet.c +++ b/drivers/char/hpet.c | |||
@@ -215,9 +215,7 @@ static void hpet_timer_set_irq(struct hpet_dev *devp) | |||
215 | else | 215 | else |
216 | v &= ~0xffff; | 216 | v &= ~0xffff; |
217 | 217 | ||
218 | for (irq = find_first_bit(&v, HPET_MAX_IRQ); irq < HPET_MAX_IRQ; | 218 | for_each_set_bit(irq, &v, HPET_MAX_IRQ) { |
219 | irq = find_next_bit(&v, HPET_MAX_IRQ, 1 + irq)) { | ||
220 | |||
221 | if (irq >= nr_irqs) { | 219 | if (irq >= nr_irqs) { |
222 | irq = HPET_MAX_IRQ; | 220 | irq = HPET_MAX_IRQ; |
223 | break; | 221 | break; |