Commit cdedc4df authored by Kai Germaschewski's avatar Kai Germaschewski

ISDN: AVM drivers: Get rid of ->interrupt

Interrupt handlers won't be reentered anyway.
parent 2c5a8715
...@@ -72,8 +72,6 @@ typedef struct avmcard { ...@@ -72,8 +72,6 @@ typedef struct avmcard {
char msgbuf[128]; /* capimsg msg part */ char msgbuf[128]; /* capimsg msg part */
char databuf[2048]; /* capimsg data part */ char databuf[2048]; /* capimsg data part */
int interrupt;
void *mbase; void *mbase;
volatile u32 csr; volatile u32 csr;
avmcard_dmainfo *dma; avmcard_dmainfo *dma;
......
...@@ -372,11 +372,8 @@ static void b1dma_dispatch_tx(avmcard *card) ...@@ -372,11 +372,8 @@ static void b1dma_dispatch_tx(avmcard *card)
u8 cmd, subcmd; u8 cmd, subcmd;
u16 len; u16 len;
u32 txlen; u32 txlen;
int inint;
void *p; void *p;
inint = card->interrupt;
skb = skb_dequeue(&dma->send_queue); skb = skb_dequeue(&dma->send_queue);
len = CAPIMSG_LEN(skb->data); len = CAPIMSG_LEN(skb->data);
...@@ -398,8 +395,7 @@ static void b1dma_dispatch_tx(avmcard *card) ...@@ -398,8 +395,7 @@ static void b1dma_dispatch_tx(avmcard *card)
} }
txlen = (u8 *)p - (u8 *)dma->sendbuf.dmabuf; txlen = (u8 *)p - (u8 *)dma->sendbuf.dmabuf;
#ifdef CONFIG_B1DMA_DEBUG #ifdef CONFIG_B1DMA_DEBUG
printk(KERN_DEBUG "tx(%d): put msg len=%d\n", printk(KERN_DEBUG "tx: put msg len=%d\n", txlen);
inint, txlen);
#endif #endif
} else { } else {
txlen = skb->len-2; txlen = skb->len-2;
...@@ -408,8 +404,8 @@ static void b1dma_dispatch_tx(avmcard *card) ...@@ -408,8 +404,8 @@ static void b1dma_dispatch_tx(avmcard *card)
printk(KERN_INFO "%s: send ack\n", card->name); printk(KERN_INFO "%s: send ack\n", card->name);
#endif #endif
#ifdef CONFIG_B1DMA_DEBUG #ifdef CONFIG_B1DMA_DEBUG
printk(KERN_DEBUG "tx(%d): put 0x%x len=%d\n", printk(KERN_DEBUG "tx: put 0x%x len=%d\n",
inint, skb->data[2], txlen); skb->data[2], txlen);
#endif #endif
memcpy(dma->sendbuf.dmabuf, skb->data+2, skb->len-2); memcpy(dma->sendbuf.dmabuf, skb->data+2, skb->len-2);
} }
...@@ -619,24 +615,9 @@ static void b1dma_handle_interrupt(avmcard *card) ...@@ -619,24 +615,9 @@ static void b1dma_handle_interrupt(avmcard *card)
void b1dma_interrupt(int interrupt, void *devptr, struct pt_regs *regs) void b1dma_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{ {
avmcard *card; avmcard *card = devptr;
card = (avmcard *) devptr;
if (!card) {
printk(KERN_WARNING "b1dma: interrupt: wrong device\n");
return;
}
if (card->interrupt) {
printk(KERN_ERR "%s: reentering interrupt hander\n", card->name);
return;
}
card->interrupt = 1;
b1dma_handle_interrupt(card); b1dma_handle_interrupt(card);
card->interrupt = 0;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
......
...@@ -36,25 +36,11 @@ MODULE_LICENSE("GPL"); ...@@ -36,25 +36,11 @@ MODULE_LICENSE("GPL");
static void b1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs) static void b1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{ {
avmcard *card; avmcard *card = (avmcard *) devptr;
card = (avmcard *) devptr;
if (!card) {
printk(KERN_WARNING "b1_interrupt: wrong device\n");
return;
}
if (card->interrupt) {
printk(KERN_ERR "b1_interrupt: reentering interrupt hander (%s)\n", card->name);
return;
}
card->interrupt = 1;
b1_handle_interrupt(card); b1_handle_interrupt(card);
card->interrupt = 0;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static struct capi_driver_interface *di; static struct capi_driver_interface *di;
......
...@@ -48,24 +48,9 @@ static struct capi_driver_interface *di; ...@@ -48,24 +48,9 @@ static struct capi_driver_interface *di;
static void b1pci_interrupt(int interrupt, void *devptr, struct pt_regs *regs) static void b1pci_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{ {
avmcard *card; avmcard *card = devptr;
card = (avmcard *) devptr;
if (!card) {
printk(KERN_WARNING "b1pci: interrupt: wrong device\n");
return;
}
if (card->interrupt) {
printk(KERN_ERR "%s: reentering interrupt hander.\n", card->name);
return;
}
card->interrupt = 1;
b1_handle_interrupt(card); b1_handle_interrupt(card);
card->interrupt = 0;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
......
...@@ -41,26 +41,11 @@ static struct capi_driver_interface *di; ...@@ -41,26 +41,11 @@ static struct capi_driver_interface *di;
static void b1pcmcia_interrupt(int interrupt, void *devptr, struct pt_regs *regs) static void b1pcmcia_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{ {
avmcard *card; avmcard *card = devptr;
card = (avmcard *) devptr;
if (!card) {
printk(KERN_WARNING "b1pcmcia: interrupt: wrong device\n");
return;
}
if (card->interrupt) {
printk(KERN_ERR "%s: reentering interrupt hander.\n",
card->name);
return;
}
card->interrupt = 1;
b1_handle_interrupt(card); b1_handle_interrupt(card);
card->interrupt = 0;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static void b1pcmcia_remove_ctr(struct capi_ctr *ctrl) static void b1pcmcia_remove_ctr(struct capi_ctr *ctrl)
......
...@@ -719,25 +719,9 @@ static void c4_handle_interrupt(avmcard *card) ...@@ -719,25 +719,9 @@ static void c4_handle_interrupt(avmcard *card)
static void c4_interrupt(int interrupt, void *devptr, struct pt_regs *regs) static void c4_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{ {
avmcard *card; avmcard *card = devptr;
card = (avmcard *) devptr;
if (!card) {
printk(KERN_WARNING "%s: interrupt: wrong device\n", card->name);
return;
}
if (card->interrupt) {
printk(KERN_ERR "%s: reentering interrupt hander\n",
card->name);
return;
}
card->interrupt = 1;
c4_handle_interrupt(card); c4_handle_interrupt(card);
card->interrupt = 0;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
......
...@@ -263,26 +263,11 @@ static void t1_handle_interrupt(avmcard * card) ...@@ -263,26 +263,11 @@ static void t1_handle_interrupt(avmcard * card)
static void t1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs) static void t1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{ {
avmcard *card; avmcard *card = devptr;
card = (avmcard *) devptr;
if (!card) {
printk(KERN_WARNING "t1isa: interrupt: wrong device\n");
return;
}
if (card->interrupt) {
printk(KERN_ERR "%s: reentering interrupt hander.\n",
card->name);
return;
}
card->interrupt = 1;
t1_handle_interrupt(card); t1_handle_interrupt(card);
card->interrupt = 0;
} }
/* ------------------------------------------------------------- */ /* ------------------------------------------------------------- */
static int t1isa_load_firmware(struct capi_ctr *ctrl, capiloaddata *data) static int t1isa_load_firmware(struct capi_ctr *ctrl, capiloaddata *data)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment