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 {
char msgbuf[128]; /* capimsg msg part */
char databuf[2048]; /* capimsg data part */
int interrupt;
void *mbase;
volatile u32 csr;
avmcard_dmainfo *dma;
......
......@@ -372,11 +372,8 @@ static void b1dma_dispatch_tx(avmcard *card)
u8 cmd, subcmd;
u16 len;
u32 txlen;
int inint;
void *p;
inint = card->interrupt;
skb = skb_dequeue(&dma->send_queue);
len = CAPIMSG_LEN(skb->data);
......@@ -398,8 +395,7 @@ static void b1dma_dispatch_tx(avmcard *card)
}
txlen = (u8 *)p - (u8 *)dma->sendbuf.dmabuf;
#ifdef CONFIG_B1DMA_DEBUG
printk(KERN_DEBUG "tx(%d): put msg len=%d\n",
inint, txlen);
printk(KERN_DEBUG "tx: put msg len=%d\n", txlen);
#endif
} else {
txlen = skb->len-2;
......@@ -408,8 +404,8 @@ static void b1dma_dispatch_tx(avmcard *card)
printk(KERN_INFO "%s: send ack\n", card->name);
#endif
#ifdef CONFIG_B1DMA_DEBUG
printk(KERN_DEBUG "tx(%d): put 0x%x len=%d\n",
inint, skb->data[2], txlen);
printk(KERN_DEBUG "tx: put 0x%x len=%d\n",
skb->data[2], txlen);
#endif
memcpy(dma->sendbuf.dmabuf, skb->data+2, skb->len-2);
}
......@@ -619,24 +615,9 @@ static void b1dma_handle_interrupt(avmcard *card)
void b1dma_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{
avmcard *card;
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;
avmcard *card = devptr;
b1dma_handle_interrupt(card);
card->interrupt = 0;
}
/* ------------------------------------------------------------- */
......
......@@ -36,25 +36,11 @@ MODULE_LICENSE("GPL");
static void b1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{
avmcard *card;
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;
avmcard *card = (avmcard *) devptr;
b1_handle_interrupt(card);
card->interrupt = 0;
}
/* ------------------------------------------------------------- */
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)
{
avmcard *card;
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;
avmcard *card = devptr;
b1_handle_interrupt(card);
card->interrupt = 0;
}
/* ------------------------------------------------------------- */
......
......@@ -41,26 +41,11 @@ static struct capi_driver_interface *di;
static void b1pcmcia_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{
avmcard *card;
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;
avmcard *card = devptr;
b1_handle_interrupt(card);
card->interrupt = 0;
}
/* ------------------------------------------------------------- */
static void b1pcmcia_remove_ctr(struct capi_ctr *ctrl)
......
......@@ -719,25 +719,9 @@ static void c4_handle_interrupt(avmcard *card)
static void c4_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{
avmcard *card;
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;
avmcard *card = devptr;
c4_handle_interrupt(card);
card->interrupt = 0;
}
/* ------------------------------------------------------------- */
......
......@@ -263,26 +263,11 @@ static void t1_handle_interrupt(avmcard * card)
static void t1isa_interrupt(int interrupt, void *devptr, struct pt_regs *regs)
{
avmcard *card;
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;
avmcard *card = devptr;
t1_handle_interrupt(card);
card->interrupt = 0;
}
/* ------------------------------------------------------------- */
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