aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/hpet.c
diff options
context:
space:
mode:
authorAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
committerAndrea Bastoni <bastoni@cs.unc.edu>2010-05-30 19:16:45 -0400
commitada47b5fe13d89735805b566185f4885f5a3f750 (patch)
tree644b88f8a71896307d71438e9b3af49126ffb22b /drivers/char/hpet.c
parent43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff)
parent3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff)
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/char/hpet.c')
-rw-r--r--drivers/char/hpet.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 70a770ac0138..9ded667625ac 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -31,6 +31,7 @@
31#include <linux/seq_file.h> 31#include <linux/seq_file.h>
32#include <linux/bitops.h> 32#include <linux/bitops.h>
33#include <linux/clocksource.h> 33#include <linux/clocksource.h>
34#include <linux/slab.h>
34 35
35#include <asm/current.h> 36#include <asm/current.h>
36#include <asm/uaccess.h> 37#include <asm/uaccess.h>
@@ -215,9 +216,7 @@ static void hpet_timer_set_irq(struct hpet_dev *devp)
215 else 216 else
216 v &= ~0xffff; 217 v &= ~0xffff;
217 218
218 for (irq = find_first_bit(&v, HPET_MAX_IRQ); irq < HPET_MAX_IRQ; 219 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) { 220 if (irq >= nr_irqs) {
222 irq = HPET_MAX_IRQ; 221 irq = HPET_MAX_IRQ;
223 break; 222 break;
@@ -675,36 +674,33 @@ static int hpet_is_known(struct hpet_data *hdp)
675 674
676static ctl_table hpet_table[] = { 675static ctl_table hpet_table[] = {
677 { 676 {
678 .ctl_name = CTL_UNNUMBERED,
679 .procname = "max-user-freq", 677 .procname = "max-user-freq",
680 .data = &hpet_max_freq, 678 .data = &hpet_max_freq,
681 .maxlen = sizeof(int), 679 .maxlen = sizeof(int),
682 .mode = 0644, 680 .mode = 0644,
683 .proc_handler = &proc_dointvec, 681 .proc_handler = proc_dointvec,
684 }, 682 },
685 {.ctl_name = 0} 683 {}
686}; 684};
687 685
688static ctl_table hpet_root[] = { 686static ctl_table hpet_root[] = {
689 { 687 {
690 .ctl_name = CTL_UNNUMBERED,
691 .procname = "hpet", 688 .procname = "hpet",
692 .maxlen = 0, 689 .maxlen = 0,
693 .mode = 0555, 690 .mode = 0555,
694 .child = hpet_table, 691 .child = hpet_table,
695 }, 692 },
696 {.ctl_name = 0} 693 {}
697}; 694};
698 695
699static ctl_table dev_root[] = { 696static ctl_table dev_root[] = {
700 { 697 {
701 .ctl_name = CTL_DEV,
702 .procname = "dev", 698 .procname = "dev",
703 .maxlen = 0, 699 .maxlen = 0,
704 .mode = 0555, 700 .mode = 0555,
705 .child = hpet_root, 701 .child = hpet_root,
706 }, 702 },
707 {.ctl_name = 0} 703 {}
708}; 704};
709 705
710static struct ctl_table_header *sysctl_header; 706static struct ctl_table_header *sysctl_header;