[patch 2/3] x86: io-apic - declare irq_cfg_lock for SPARSE_IRQ only

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Cyrill Gorcunov
Date: Thursday, September 4, 2008 - 11:37 am

We use irq_cfg_lock lock in SPARSE_IRQ only context so
move it under #ifdef and compiler will be happy.

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---

Index: linux-2.6.git/arch/x86/kernel/io_apic.c
===================================================================
--- linux-2.6.git.orig/arch/x86/kernel/io_apic.c	2008-09-04 22:06:37.000000000 +0400
+++ linux-2.6.git/arch/x86/kernel/io_apic.c	2008-09-04 22:08:06.000000000 +0400
@@ -147,14 +147,15 @@ static void init_one_irq_cfg(struct irq_
 
 static struct irq_cfg *irq_cfgx;
 
+#ifdef CONFIG_HAVE_SPARSE_IRQ
 /*
  * Protect the irq_cfgx_free freelist:
  */
 static DEFINE_SPINLOCK(irq_cfg_lock);
 
-#ifdef CONFIG_HAVE_SPARSE_IRQ
 static struct irq_cfg *irq_cfgx_free;
 #endif
+
 static void __init init_work(void *data)
 {
 	struct dyn_array *da = data;

-- 
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 2/3] x86: io-apic - declare irq_cfg_lock for SPARSE ..., Cyrill Gorcunov, (Thu Sep 4, 11:37 am)