diff options
| author | Yinghai Lu <yinghai@kernel.org> | 2009-04-27 20:59:21 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-04-28 06:21:16 -0400 |
| commit | d5dedd4507d307eb3f35f21b6e16f336fdc0d82a (patch) | |
| tree | 2c31b00395bde49ec4c5a415b081daaec44d3dab /arch/alpha/kernel | |
| parent | fcef5911c7ea89b80d5bfc727f402f37c9eefd57 (diff) | |
irq: change ->set_affinity() to return status
according to Ingo, change set_affinity() in irq_chip should return int,
because that way we can handle failure cases in a much cleaner way, in
the genirq layer.
v2: fix two typos
[ Impact: extend API ]
Signed-off-by: Yinghai Lu <yinghai@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: linux-arch@vger.kernel.org
LKML-Reference: <49F654E9.4070809@kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'arch/alpha/kernel')
| -rw-r--r-- | arch/alpha/kernel/sys_dp264.c | 8 | ||||
| -rw-r--r-- | arch/alpha/kernel/sys_titan.c | 4 |
2 files changed, 9 insertions, 3 deletions
diff --git a/arch/alpha/kernel/sys_dp264.c b/arch/alpha/kernel/sys_dp264.c index 9c9d1fd4155f..5bd5259324b7 100644 --- a/arch/alpha/kernel/sys_dp264.c +++ b/arch/alpha/kernel/sys_dp264.c | |||
| @@ -176,22 +176,26 @@ cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) | |||
| 176 | } | 176 | } |
| 177 | } | 177 | } |
| 178 | 178 | ||
| 179 | static void | 179 | static int |
| 180 | dp264_set_affinity(unsigned int irq, const struct cpumask *affinity) | 180 | dp264_set_affinity(unsigned int irq, const struct cpumask *affinity) |
| 181 | { | 181 | { |
| 182 | spin_lock(&dp264_irq_lock); | 182 | spin_lock(&dp264_irq_lock); |
| 183 | cpu_set_irq_affinity(irq, *affinity); | 183 | cpu_set_irq_affinity(irq, *affinity); |
| 184 | tsunami_update_irq_hw(cached_irq_mask); | 184 | tsunami_update_irq_hw(cached_irq_mask); |
| 185 | spin_unlock(&dp264_irq_lock); | 185 | spin_unlock(&dp264_irq_lock); |
| 186 | |||
| 187 | return 0; | ||
| 186 | } | 188 | } |
| 187 | 189 | ||
| 188 | static void | 190 | static int |
| 189 | clipper_set_affinity(unsigned int irq, const struct cpumask *affinity) | 191 | clipper_set_affinity(unsigned int irq, const struct cpumask *affinity) |
| 190 | { | 192 | { |
| 191 | spin_lock(&dp264_irq_lock); | 193 | spin_lock(&dp264_irq_lock); |
| 192 | cpu_set_irq_affinity(irq - 16, *affinity); | 194 | cpu_set_irq_affinity(irq - 16, *affinity); |
| 193 | tsunami_update_irq_hw(cached_irq_mask); | 195 | tsunami_update_irq_hw(cached_irq_mask); |
| 194 | spin_unlock(&dp264_irq_lock); | 196 | spin_unlock(&dp264_irq_lock); |
| 197 | |||
| 198 | return 0; | ||
| 195 | } | 199 | } |
| 196 | 200 | ||
| 197 | static struct hw_interrupt_type dp264_irq_type = { | 201 | static struct hw_interrupt_type dp264_irq_type = { |
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 27f840a4ad3d..8dd239ebdb9e 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
| @@ -157,13 +157,15 @@ titan_cpu_set_irq_affinity(unsigned int irq, cpumask_t affinity) | |||
| 157 | 157 | ||
| 158 | } | 158 | } |
| 159 | 159 | ||
| 160 | static void | 160 | static int |
| 161 | titan_set_irq_affinity(unsigned int irq, const struct cpumask *affinity) | 161 | titan_set_irq_affinity(unsigned int irq, const struct cpumask *affinity) |
| 162 | { | 162 | { |
| 163 | spin_lock(&titan_irq_lock); | 163 | spin_lock(&titan_irq_lock); |
| 164 | titan_cpu_set_irq_affinity(irq - 16, *affinity); | 164 | titan_cpu_set_irq_affinity(irq - 16, *affinity); |
| 165 | titan_update_irq_hw(titan_cached_irq_mask); | 165 | titan_update_irq_hw(titan_cached_irq_mask); |
| 166 | spin_unlock(&titan_irq_lock); | 166 | spin_unlock(&titan_irq_lock); |
| 167 | |||
| 168 | return 0; | ||
| 167 | } | 169 | } |
| 168 | 170 | ||
| 169 | static void | 171 | static void |
