diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-06-29 05:24:40 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-29 13:26:22 -0400 |
commit | 06fcb0c6fb3aae9570a32ac3b72a8222563baa69 (patch) | |
tree | c1f9d750a42031434971b2271882b907fd7838f5 /kernel/irq/autoprobe.c | |
parent | 2e60bbb6d50de654d8e68f115161e27878b5e72d (diff) |
[PATCH] genirq: cleanup: misc code cleanups
Assorted code cleanups to the generic IRQ code.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel/irq/autoprobe.c')
-rw-r--r-- | kernel/irq/autoprobe.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/kernel/irq/autoprobe.c b/kernel/irq/autoprobe.c index d1f1e6f10a23..d6eab98a3173 100644 --- a/kernel/irq/autoprobe.c +++ b/kernel/irq/autoprobe.c | |||
@@ -27,7 +27,7 @@ static DEFINE_MUTEX(probing_active); | |||
27 | */ | 27 | */ |
28 | unsigned long probe_irq_on(void) | 28 | unsigned long probe_irq_on(void) |
29 | { | 29 | { |
30 | unsigned long val; | 30 | unsigned long mask; |
31 | irq_desc_t *desc; | 31 | irq_desc_t *desc; |
32 | unsigned int i; | 32 | unsigned int i; |
33 | 33 | ||
@@ -40,8 +40,8 @@ unsigned long probe_irq_on(void) | |||
40 | desc = irq_desc + i; | 40 | desc = irq_desc + i; |
41 | 41 | ||
42 | spin_lock_irq(&desc->lock); | 42 | spin_lock_irq(&desc->lock); |
43 | if (!irq_desc[i].action) | 43 | if (!desc->action) |
44 | irq_desc[i].chip->startup(i); | 44 | desc->chip->startup(i); |
45 | spin_unlock_irq(&desc->lock); | 45 | spin_unlock_irq(&desc->lock); |
46 | } | 46 | } |
47 | 47 | ||
@@ -73,11 +73,11 @@ unsigned long probe_irq_on(void) | |||
73 | /* | 73 | /* |
74 | * Now filter out any obviously spurious interrupts | 74 | * Now filter out any obviously spurious interrupts |
75 | */ | 75 | */ |
76 | val = 0; | 76 | mask = 0; |
77 | for (i = 0; i < NR_IRQS; i++) { | 77 | for (i = 0; i < NR_IRQS; i++) { |
78 | irq_desc_t *desc = irq_desc + i; | ||
79 | unsigned int status; | 78 | unsigned int status; |
80 | 79 | ||
80 | desc = irq_desc + i; | ||
81 | spin_lock_irq(&desc->lock); | 81 | spin_lock_irq(&desc->lock); |
82 | status = desc->status; | 82 | status = desc->status; |
83 | 83 | ||
@@ -88,14 +88,13 @@ unsigned long probe_irq_on(void) | |||
88 | desc->chip->shutdown(i); | 88 | desc->chip->shutdown(i); |
89 | } else | 89 | } else |
90 | if (i < 32) | 90 | if (i < 32) |
91 | val |= 1 << i; | 91 | mask |= 1 << i; |
92 | } | 92 | } |
93 | spin_unlock_irq(&desc->lock); | 93 | spin_unlock_irq(&desc->lock); |
94 | } | 94 | } |
95 | 95 | ||
96 | return val; | 96 | return mask; |
97 | } | 97 | } |
98 | |||
99 | EXPORT_SYMBOL(probe_irq_on); | 98 | EXPORT_SYMBOL(probe_irq_on); |
100 | 99 | ||
101 | /** | 100 | /** |
@@ -184,6 +183,5 @@ int probe_irq_off(unsigned long val) | |||
184 | 183 | ||
185 | return irq_found; | 184 | return irq_found; |
186 | } | 185 | } |
187 | |||
188 | EXPORT_SYMBOL(probe_irq_off); | 186 | EXPORT_SYMBOL(probe_irq_off); |
189 | 187 | ||