From: Frédéric Brière Subject: [PATCH] Rename irq_count to cbm_irq_count in Linux kernel module arch/x86/include/asm/processor.h already defines a variable called irq_count for CONFIG_X86_64. Signed-off-by: Frédéric Brière Forwarded: yes --- sys/linux/cbm_module.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/linux/cbm_module.c b/sys/linux/cbm_module.c index d8c5a23..451657c 100644 --- a/sys/linux/cbm_module.c +++ b/sys/linux/cbm_module.c @@ -254,7 +254,7 @@ static struct wait_queue *cbm_wait_q; static wait_queue_head_t cbm_wait_q; #endif volatile static int eoi; -volatile static int irq_count; +volatile static int cbm_irq_count; #ifndef KERNEL_VERSION # define signal_pending(p) (p->signal & ~p->blocked) @@ -422,7 +422,7 @@ static void wait_for_listener(void) add_wait_queue(&cbm_wait_q, &wait); current->state = TASK_INTERRUPTIBLE; RELEASE(CLK_OUT); - while(irq_count && !signal_pending(current)) { + while(cbm_irq_count && !signal_pending(current)) { schedule(); } remove_wait_queue(&cbm_wait_q, &wait); @@ -534,7 +534,7 @@ static int cbm_raw_write(const char *buf, size_t cnt, int atn, int talk) size_t sent = 0; unsigned long flags; - eoi = irq_count = 0; + eoi = cbm_irq_count = 0; DPRINTK("cbm_write: %d bytes, atn=%d\n", cnt, atn); @@ -571,7 +571,7 @@ static int cbm_raw_write(const char *buf, size_t cnt, int atn, int talk) } udelay(50); if(GET(DATA_IN)) { - irq_count = ((sent == (cnt-1)) && (atn == 0)) ? 2 : 1; + cbm_irq_count = ((sent == (cnt-1)) && (atn == 0)) ? 2 : 1; wait_for_listener(); if(signal_pending(current)) { @@ -883,10 +883,10 @@ static irqreturn_t cbm_interrupt(int irq, void *dev_id) { POLL(); /* acknowledge interrupt */ - if(irq_count == 0) { + if(cbm_irq_count == 0) { return IRQ_NONE; } - if(--irq_count == 0) { + if(--cbm_irq_count == 0) { DPRINTK("continue to send (no EOI)\n"); SET(CLK_OUT); wake_up_interruptible(&cbm_wait_q); @@ -1028,7 +1028,7 @@ int cbm_init(void) #endif ); - irq_count = 0; + cbm_irq_count = 0; out_bits = (CTRL_READ() ^ out_eor) & (DATA_OUT|CLK_OUT|ATN_OUT|RESET); -- tg: (a9f3f01..) fixes/irq_count (depends on: upstream)