Skip to content

Commit

Permalink
x86: io-apic - declare irq_cfg_lock for SPARSE_IRQ only
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
  • Loading branch information
Cyrill Gorcunov authored and Ingo Molnar committed Oct 16, 2008
1 parent 676f4a9 commit ac54a6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/x86/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,14 +147,15 @@ static void init_one_irq_cfg(struct irq_cfg *cfg)

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;
Expand Down

0 comments on commit ac54a6c

Please sign in to comment.