linamh/app-emulation/opencbm/files/0.4.3_rc2/0005-Rename-irq_count-to-cbm_irq_count-in-Linux-kernel-mo.patch

81 lines
2.7 KiB
Diff
Raw Normal View History

2017-11-10 12:02:18 +01:00
From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Bri=C3=A8re?= <fbriere@fbriere.net>
Date: Fri, 20 May 2011 12:50:53 -0400
Subject: Rename irq_count to cbm_irq_count in Linux kernel module
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
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 <fbriere@fbriere.net>
2017-11-10 12:02:18 +01:00
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
2017-11-10 12:02:18 +01:00
index 91ea8f3..4b50626 100644
--- a/sys/linux/cbm_module.c
+++ b/sys/linux/cbm_module.c
2017-11-10 12:02:18 +01:00
@@ -257,7 +257,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)
2017-11-10 12:02:18 +01:00
@@ -425,7 +425,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);
2017-11-10 12:02:18 +01:00
@@ -537,7 +537,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);
2017-11-10 12:02:18 +01:00
@@ -574,7 +574,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)) {
2017-11-10 12:02:18 +01:00
@@ -886,10 +886,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);
2017-11-10 12:02:18 +01:00
@@ -1031,7 +1031,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);
--