summaryrefslogtreecommitdiffstats
path: root/kernel/irq/handle.c
diff options
context:
space:
mode:
authorYinghai Lu <yinghai@kernel.org>2010-02-10 01:20:34 -0800
committerH. Peter Anvin <hpa@zytor.com>2010-02-17 17:27:03 -0800
commit99558f0bbe68cb09799ec38adbaa3f3b2dc7ba63 (patch)
tree03a0393cae76ac3d0249fc53128974433d94e802 /kernel/irq/handle.c
parent773e3eb7b81e5ba13b5155dfb3bb75b8ce37f8f9 (diff)
downloadlinux-99558f0bbe68cb09799ec38adbaa3f3b2dc7ba63.tar.bz2
sparseirq: Change irq_desc_ptrs to static
Add replace_irq_desc() instead of poking at the array directly. -v2: remove unneeded boundary check in replace_irq_desc Signed-off-by: Yinghai Lu <yinghai@kernel.org> LKML-Reference: <1265793639-15071-31-git-send-email-yinghai@kernel.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'kernel/irq/handle.c')
-rw-r--r--kernel/irq/handle.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/kernel/irq/handle.c b/kernel/irq/handle.c
index 0e823c0d1c9c..266f7986aa08 100644
--- a/kernel/irq/handle.c
+++ b/kernel/irq/handle.c
@@ -127,7 +127,7 @@ static void init_one_irq_desc(int irq, struct irq_desc *desc, int node)
*/
DEFINE_RAW_SPINLOCK(sparse_irq_lock);
-struct irq_desc **irq_desc_ptrs __read_mostly;
+static struct irq_desc **irq_desc_ptrs __read_mostly;
static struct irq_desc irq_desc_legacy[NR_IRQS_LEGACY] __cacheline_aligned_in_smp = {
[0 ... NR_IRQS_LEGACY-1] = {
@@ -192,6 +192,11 @@ struct irq_desc *irq_to_desc(unsigned int irq)
return NULL;
}
+void replace_irq_desc(unsigned int irq, struct irq_desc *desc)
+{
+ irq_desc_ptrs[irq] = desc;
+}
+
struct irq_desc * __ref irq_to_desc_alloc_node(unsigned int irq, int node)
{
struct irq_desc *desc;