diff options
Diffstat (limited to 'drivers')
65 files changed, 97 insertions, 316 deletions
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 8ff5c4e50823..323592de047b 100644 --- a/drivers/atm/ambassador.c +++ b/drivers/atm/ambassador.c | |||
@@ -862,15 +862,10 @@ static inline void interrupts_off (amb_dev * dev) { | |||
862 | /********** interrupt handling **********/ | 862 | /********** interrupt handling **********/ |
863 | 863 | ||
864 | static irqreturn_t interrupt_handler(int irq, void *dev_id) { | 864 | static irqreturn_t interrupt_handler(int irq, void *dev_id) { |
865 | amb_dev * dev = (amb_dev *) dev_id; | 865 | amb_dev * dev = dev_id; |
866 | 866 | ||
867 | PRINTD (DBG_IRQ|DBG_FLOW, "interrupt_handler: %p", dev_id); | 867 | PRINTD (DBG_IRQ|DBG_FLOW, "interrupt_handler: %p", dev_id); |
868 | 868 | ||
869 | if (!dev_id) { | ||
870 | PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq); | ||
871 | return IRQ_NONE; | ||
872 | } | ||
873 | |||
874 | { | 869 | { |
875 | u32 interrupt = rd_plain (dev, offsetof(amb_mem, interrupt)); | 870 | u32 interrupt = rd_plain (dev, offsetof(amb_mem, interrupt)); |
876 | 871 | ||
diff --git a/drivers/atm/horizon.c b/drivers/atm/horizon.c index 33e9ee47392b..f59349206dd2 100644 --- a/drivers/atm/horizon.c +++ b/drivers/atm/horizon.c | |||
@@ -1389,15 +1389,6 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id) { | |||
1389 | 1389 | ||
1390 | PRINTD (DBG_FLOW, "interrupt_handler: %p", dev_id); | 1390 | PRINTD (DBG_FLOW, "interrupt_handler: %p", dev_id); |
1391 | 1391 | ||
1392 | if (!dev_id) { | ||
1393 | PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq); | ||
1394 | return IRQ_NONE; | ||
1395 | } | ||
1396 | if (irq != dev->irq) { | ||
1397 | PRINTD (DBG_IRQ|DBG_ERR, "irq mismatch: %d", irq); | ||
1398 | return IRQ_NONE; | ||
1399 | } | ||
1400 | |||
1401 | // definitely for us | 1392 | // definitely for us |
1402 | irq_ok = 0; | 1393 | irq_ok = 0; |
1403 | while ((int_source = rd_regl (dev, INT_SOURCE_REG_OFF) | 1394 | while ((int_source = rd_regl (dev, INT_SOURCE_REG_OFF) |
diff --git a/drivers/atm/lanai.c b/drivers/atm/lanai.c index 8895f026bea7..267825501dfe 100644 --- a/drivers/atm/lanai.c +++ b/drivers/atm/lanai.c | |||
@@ -1892,11 +1892,9 @@ static inline void lanai_int_1(struct lanai_dev *lanai, u32 reason) | |||
1892 | 1892 | ||
1893 | static irqreturn_t lanai_int(int irq, void *devid) | 1893 | static irqreturn_t lanai_int(int irq, void *devid) |
1894 | { | 1894 | { |
1895 | struct lanai_dev *lanai = (struct lanai_dev *) devid; | 1895 | struct lanai_dev *lanai = devid; |
1896 | u32 reason; | 1896 | u32 reason; |
1897 | 1897 | ||
1898 | (void) irq; /* unused variables */ | ||
1899 | |||
1900 | #ifdef USE_POWERDOWN | 1898 | #ifdef USE_POWERDOWN |
1901 | /* | 1899 | /* |
1902 | * If we're powered down we shouldn't be generating any interrupts - | 1900 | * If we're powered down we shouldn't be generating any interrupts - |
diff --git a/drivers/block/DAC960.c b/drivers/block/DAC960.c index 3e8ab84b9447..742d07403101 100644 --- a/drivers/block/DAC960.c +++ b/drivers/block/DAC960.c | |||
@@ -5254,7 +5254,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command) | |||
5254 | static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel, | 5254 | static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel, |
5255 | void *DeviceIdentifier) | 5255 | void *DeviceIdentifier) |
5256 | { | 5256 | { |
5257 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5257 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5258 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5258 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5259 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; | 5259 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; |
5260 | unsigned long flags; | 5260 | unsigned long flags; |
@@ -5295,7 +5295,7 @@ static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel, | |||
5295 | static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel, | 5295 | static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel, |
5296 | void *DeviceIdentifier) | 5296 | void *DeviceIdentifier) |
5297 | { | 5297 | { |
5298 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5298 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5299 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5299 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5300 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; | 5300 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; |
5301 | unsigned long flags; | 5301 | unsigned long flags; |
@@ -5337,7 +5337,7 @@ static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel, | |||
5337 | static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel, | 5337 | static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel, |
5338 | void *DeviceIdentifier) | 5338 | void *DeviceIdentifier) |
5339 | { | 5339 | { |
5340 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5340 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5341 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5341 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5342 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; | 5342 | DAC960_V2_StatusMailbox_T *NextStatusMailbox; |
5343 | unsigned long flags; | 5343 | unsigned long flags; |
@@ -5379,7 +5379,7 @@ static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel, | |||
5379 | static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel, | 5379 | static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel, |
5380 | void *DeviceIdentifier) | 5380 | void *DeviceIdentifier) |
5381 | { | 5381 | { |
5382 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5382 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5383 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5383 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5384 | DAC960_V1_StatusMailbox_T *NextStatusMailbox; | 5384 | DAC960_V1_StatusMailbox_T *NextStatusMailbox; |
5385 | unsigned long flags; | 5385 | unsigned long flags; |
@@ -5417,7 +5417,7 @@ static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel, | |||
5417 | static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel, | 5417 | static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel, |
5418 | void *DeviceIdentifier) | 5418 | void *DeviceIdentifier) |
5419 | { | 5419 | { |
5420 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5420 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5421 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5421 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5422 | DAC960_V1_StatusMailbox_T *NextStatusMailbox; | 5422 | DAC960_V1_StatusMailbox_T *NextStatusMailbox; |
5423 | unsigned long flags; | 5423 | unsigned long flags; |
@@ -5455,7 +5455,7 @@ static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel, | |||
5455 | static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel, | 5455 | static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel, |
5456 | void *DeviceIdentifier) | 5456 | void *DeviceIdentifier) |
5457 | { | 5457 | { |
5458 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5458 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5459 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5459 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5460 | unsigned long flags; | 5460 | unsigned long flags; |
5461 | 5461 | ||
@@ -5493,7 +5493,7 @@ static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel, | |||
5493 | static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel, | 5493 | static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel, |
5494 | void *DeviceIdentifier) | 5494 | void *DeviceIdentifier) |
5495 | { | 5495 | { |
5496 | DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier; | 5496 | DAC960_Controller_T *Controller = DeviceIdentifier; |
5497 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; | 5497 | void __iomem *ControllerBaseAddress = Controller->BaseAddress; |
5498 | unsigned long flags; | 5498 | unsigned long flags; |
5499 | 5499 | ||
diff --git a/drivers/cdrom/mcdx.c b/drivers/cdrom/mcdx.c index 60e1978ec0ea..f574962f4288 100644 --- a/drivers/cdrom/mcdx.c +++ b/drivers/cdrom/mcdx.c | |||
@@ -850,10 +850,6 @@ static irqreturn_t mcdx_intr(int irq, void *dev_id) | |||
850 | struct s_drive_stuff *stuffp = dev_id; | 850 | struct s_drive_stuff *stuffp = dev_id; |
851 | unsigned char b; | 851 | unsigned char b; |
852 | 852 | ||
853 | if (stuffp == NULL) { | ||
854 | xwarn("mcdx: no device for intr %d\n", irq); | ||
855 | return IRQ_NONE; | ||
856 | } | ||
857 | #ifdef AK2 | 853 | #ifdef AK2 |
858 | if (!stuffp->busy && stuffp->pending) | 854 | if (!stuffp->busy && stuffp->pending) |
859 | stuffp->int_err = 1; | 855 | stuffp->int_err = 1; |
diff --git a/drivers/char/rio/func.h b/drivers/char/rio/func.h index 6b039186856d..9e7283bd81a0 100644 --- a/drivers/char/rio/func.h +++ b/drivers/char/rio/func.h | |||
@@ -88,7 +88,7 @@ void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int); | |||
88 | 88 | ||
89 | /* riointr.c */ | 89 | /* riointr.c */ |
90 | void RIOTxEnable(char *); | 90 | void RIOTxEnable(char *); |
91 | void RIOServiceHost(struct rio_info *, struct Host *, int); | 91 | void RIOServiceHost(struct rio_info *, struct Host *); |
92 | int riotproc(struct rio_info *, struct ttystatics *, int, int); | 92 | int riotproc(struct rio_info *, struct ttystatics *, int, int); |
93 | 93 | ||
94 | /* rioparam.c */ | 94 | /* rioparam.c */ |
diff --git a/drivers/char/rio/rio_linux.c b/drivers/char/rio/rio_linux.c index 3bea594600d4..c382df0f82f6 100644 --- a/drivers/char/rio/rio_linux.c +++ b/drivers/char/rio/rio_linux.c | |||
@@ -368,7 +368,7 @@ static irqreturn_t rio_interrupt(int irq, void *ptr) | |||
368 | struct Host *HostP; | 368 | struct Host *HostP; |
369 | func_enter(); | 369 | func_enter(); |
370 | 370 | ||
371 | HostP = (struct Host *) ptr; /* &p->RIOHosts[(long)ptr]; */ | 371 | HostP = ptr; /* &p->RIOHosts[(long)ptr]; */ |
372 | rio_dprintk(RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec); | 372 | rio_dprintk(RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec); |
373 | 373 | ||
374 | /* AAargh! The order in which to do these things is essential and | 374 | /* AAargh! The order in which to do these things is essential and |
@@ -402,7 +402,7 @@ static irqreturn_t rio_interrupt(int irq, void *ptr) | |||
402 | return IRQ_HANDLED; | 402 | return IRQ_HANDLED; |
403 | } | 403 | } |
404 | 404 | ||
405 | RIOServiceHost(p, HostP, irq); | 405 | RIOServiceHost(p, HostP); |
406 | 406 | ||
407 | rio_dprintk(RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", ptr, HostP->Type); | 407 | rio_dprintk(RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", ptr, HostP->Type); |
408 | 408 | ||
diff --git a/drivers/char/rio/riointr.c b/drivers/char/rio/riointr.c index 0bd09040a5c0..eeda40c5e189 100644 --- a/drivers/char/rio/riointr.c +++ b/drivers/char/rio/riointr.c | |||
@@ -181,7 +181,7 @@ static int RupIntr; | |||
181 | static int RxIntr; | 181 | static int RxIntr; |
182 | static int TxIntr; | 182 | static int TxIntr; |
183 | 183 | ||
184 | void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From) | 184 | void RIOServiceHost(struct rio_info *p, struct Host *HostP) |
185 | { | 185 | { |
186 | rio_spin_lock(&HostP->HostLock); | 186 | rio_spin_lock(&HostP->HostLock); |
187 | if ((HostP->Flags & RUN_STATE) != RC_RUNNING) { | 187 | if ((HostP->Flags & RUN_STATE) != RC_RUNNING) { |
diff --git a/drivers/char/riscom8.c b/drivers/char/riscom8.c index be68cfb0ae69..5ab32b38f45a 100644 --- a/drivers/char/riscom8.c +++ b/drivers/char/riscom8.c | |||
@@ -559,11 +559,10 @@ static irqreturn_t rc_interrupt(int irq, void * dev_id) | |||
559 | int handled = 0; | 559 | int handled = 0; |
560 | 560 | ||
561 | bp = IRQ_to_board[irq]; | 561 | bp = IRQ_to_board[irq]; |
562 | 562 | ||
563 | if (!bp || !(bp->flags & RC_BOARD_ACTIVE)) { | 563 | if (!(bp->flags & RC_BOARD_ACTIVE)) |
564 | return IRQ_NONE; | 564 | return IRQ_NONE; |
565 | } | 565 | |
566 | |||
567 | while ((++loop < 16) && ((status = ~(rc_in(bp, RC_BSR))) & | 566 | while ((++loop < 16) && ((status = ~(rc_in(bp, RC_BSR))) & |
568 | (RC_BSR_TOUT | RC_BSR_TINT | | 567 | (RC_BSR_TOUT | RC_BSR_TINT | |
569 | RC_BSR_MINT | RC_BSR_RINT))) { | 568 | RC_BSR_MINT | RC_BSR_RINT))) { |
diff --git a/drivers/char/specialix.c b/drivers/char/specialix.c index 6022495571ae..d0b88d0e87fd 100644 --- a/drivers/char/specialix.c +++ b/drivers/char/specialix.c | |||
@@ -912,7 +912,7 @@ static irqreturn_t sx_interrupt(int irq, void *dev_id) | |||
912 | spin_lock_irqsave(&bp->lock, flags); | 912 | spin_lock_irqsave(&bp->lock, flags); |
913 | 913 | ||
914 | dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __FUNCTION__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1); | 914 | dprintk (SX_DEBUG_FLOW, "enter %s port %d room: %ld\n", __FUNCTION__, port_No(sx_get_port(bp, "INT")), SERIAL_XMIT_SIZE - sx_get_port(bp, "ITN")->xmit_cnt - 1); |
915 | if (!bp || !(bp->flags & SX_BOARD_ACTIVE)) { | 915 | if (!(bp->flags & SX_BOARD_ACTIVE)) { |
916 | dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", irq); | 916 | dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", irq); |
917 | spin_unlock_irqrestore(&bp->lock, flags); | 917 | spin_unlock_irqrestore(&bp->lock, flags); |
918 | func_exit(); | 918 | func_exit(); |
diff --git a/drivers/isdn/act2000/act2000_isa.c b/drivers/isdn/act2000/act2000_isa.c index 3014495b7ff7..3cac23739344 100644 --- a/drivers/isdn/act2000/act2000_isa.c +++ b/drivers/isdn/act2000/act2000_isa.c | |||
@@ -16,8 +16,6 @@ | |||
16 | #include "act2000_isa.h" | 16 | #include "act2000_isa.h" |
17 | #include "capi.h" | 17 | #include "capi.h" |
18 | 18 | ||
19 | static act2000_card *irq2card_map[16]; | ||
20 | |||
21 | /* | 19 | /* |
22 | * Reset Controller, then try to read the Card's signature. | 20 | * Reset Controller, then try to read the Card's signature. |
23 | + Return: | 21 | + Return: |
@@ -65,14 +63,9 @@ act2000_isa_detect(unsigned short portbase) | |||
65 | static irqreturn_t | 63 | static irqreturn_t |
66 | act2000_isa_interrupt(int irq, void *dev_id) | 64 | act2000_isa_interrupt(int irq, void *dev_id) |
67 | { | 65 | { |
68 | act2000_card *card = irq2card_map[irq]; | 66 | act2000_card *card = dev_id; |
69 | u_char istatus; | 67 | u_char istatus; |
70 | 68 | ||
71 | if (!card) { | ||
72 | printk(KERN_WARNING | ||
73 | "act2000: Spurious interrupt!\n"); | ||
74 | return IRQ_NONE; | ||
75 | } | ||
76 | istatus = (inb(ISA_PORT_ISR) & 0x07); | 69 | istatus = (inb(ISA_PORT_ISR) & 0x07); |
77 | if (istatus & ISA_ISR_OUT) { | 70 | if (istatus & ISA_ISR_OUT) { |
78 | /* RX fifo has data */ | 71 | /* RX fifo has data */ |
@@ -139,17 +132,15 @@ int | |||
139 | act2000_isa_config_irq(act2000_card * card, short irq) | 132 | act2000_isa_config_irq(act2000_card * card, short irq) |
140 | { | 133 | { |
141 | if (card->flags & ACT2000_FLAGS_IVALID) { | 134 | if (card->flags & ACT2000_FLAGS_IVALID) { |
142 | free_irq(card->irq, NULL); | 135 | free_irq(card->irq, card); |
143 | irq2card_map[card->irq] = NULL; | ||
144 | } | 136 | } |
145 | card->flags &= ~ACT2000_FLAGS_IVALID; | 137 | card->flags &= ~ACT2000_FLAGS_IVALID; |
146 | outb(ISA_COR_IRQOFF, ISA_PORT_COR); | 138 | outb(ISA_COR_IRQOFF, ISA_PORT_COR); |
147 | if (!irq) | 139 | if (!irq) |
148 | return 0; | 140 | return 0; |
149 | 141 | ||
150 | if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, NULL)) { | 142 | if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, card)) { |
151 | card->irq = irq; | 143 | card->irq = irq; |
152 | irq2card_map[card->irq] = card; | ||
153 | card->flags |= ACT2000_FLAGS_IVALID; | 144 | card->flags |= ACT2000_FLAGS_IVALID; |
154 | printk(KERN_WARNING | 145 | printk(KERN_WARNING |
155 | "act2000: Could not request irq %d\n",irq); | 146 | "act2000: Could not request irq %d\n",irq); |
@@ -188,10 +179,9 @@ act2000_isa_release(act2000_card * card) | |||
188 | unsigned long flags; | 179 | unsigned long flags; |
189 | 180 | ||
190 | spin_lock_irqsave(&card->lock, flags); | 181 | spin_lock_irqsave(&card->lock, flags); |
191 | if (card->flags & ACT2000_FLAGS_IVALID) { | 182 | if (card->flags & ACT2000_FLAGS_IVALID) |
192 | free_irq(card->irq, NULL); | 183 | free_irq(card->irq, card); |
193 | irq2card_map[card->irq] = NULL; | 184 | |
194 | } | ||
195 | card->flags &= ~ACT2000_FLAGS_IVALID; | 185 | card->flags &= ~ACT2000_FLAGS_IVALID; |
196 | if (card->flags & ACT2000_FLAGS_PVALID) | 186 | if (card->flags & ACT2000_FLAGS_PVALID) |
197 | release_region(card->port, ISA_REGION); | 187 | release_region(card->port, ISA_REGION); |
diff --git a/drivers/media/video/zoran_device.c b/drivers/media/video/zoran_device.c index d9d5020a2224..168e431d7c71 100644 --- a/drivers/media/video/zoran_device.c +++ b/drivers/media/video/zoran_device.c | |||
@@ -1415,7 +1415,7 @@ zoran_irq (int irq, | |||
1415 | struct zoran *zr; | 1415 | struct zoran *zr; |
1416 | unsigned long flags; | 1416 | unsigned long flags; |
1417 | 1417 | ||
1418 | zr = (struct zoran *) dev_id; | 1418 | zr = dev_id; |
1419 | count = 0; | 1419 | count = 0; |
1420 | 1420 | ||
1421 | if (zr->testing) { | 1421 | if (zr->testing) { |
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 7ad0a54779c4..f791bf026e51 100644 --- a/drivers/net/3c509.c +++ b/drivers/net/3c509.c | |||
@@ -912,16 +912,11 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
912 | static irqreturn_t | 912 | static irqreturn_t |
913 | el3_interrupt(int irq, void *dev_id) | 913 | el3_interrupt(int irq, void *dev_id) |
914 | { | 914 | { |
915 | struct net_device *dev = (struct net_device *)dev_id; | 915 | struct net_device *dev = dev_id; |
916 | struct el3_private *lp; | 916 | struct el3_private *lp; |
917 | int ioaddr, status; | 917 | int ioaddr, status; |
918 | int i = max_interrupt_work; | 918 | int i = max_interrupt_work; |
919 | 919 | ||
920 | if (dev == NULL) { | ||
921 | printk ("el3_interrupt(): irq %d for unknown device.\n", irq); | ||
922 | return IRQ_NONE; | ||
923 | } | ||
924 | |||
925 | lp = netdev_priv(dev); | 920 | lp = netdev_priv(dev); |
926 | spin_lock(&lp->lock); | 921 | spin_lock(&lp->lock); |
927 | 922 | ||
diff --git a/drivers/net/3c523.c b/drivers/net/3c523.c index 1c97271112d0..91849469b4f4 100644 --- a/drivers/net/3c523.c +++ b/drivers/net/3c523.c | |||
@@ -902,14 +902,11 @@ static void *alloc_rfa(struct net_device *dev, void *ptr) | |||
902 | static irqreturn_t | 902 | static irqreturn_t |
903 | elmc_interrupt(int irq, void *dev_id) | 903 | elmc_interrupt(int irq, void *dev_id) |
904 | { | 904 | { |
905 | struct net_device *dev = (struct net_device *) dev_id; | 905 | struct net_device *dev = dev_id; |
906 | unsigned short stat; | 906 | unsigned short stat; |
907 | struct priv *p; | 907 | struct priv *p; |
908 | 908 | ||
909 | if (dev == NULL) { | 909 | if (!netif_running(dev)) { |
910 | printk(KERN_ERR "elmc-interrupt: irq %d for unknown device.\n", irq); | ||
911 | return IRQ_NONE; | ||
912 | } else if (!netif_running(dev)) { | ||
913 | /* The 3c523 has this habit of generating interrupts during the | 910 | /* The 3c523 has this habit of generating interrupts during the |
914 | reset. I'm not sure if the ni52 has this same problem, but it's | 911 | reset. I'm not sure if the ni52 has this same problem, but it's |
915 | really annoying if we haven't finished initializing it. I was | 912 | really annoying if we haven't finished initializing it. I was |
diff --git a/drivers/net/3c527.c b/drivers/net/3c527.c index d516c3225ca4..f4aca5386add 100644 --- a/drivers/net/3c527.c +++ b/drivers/net/3c527.c | |||
@@ -1324,11 +1324,6 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id) | |||
1324 | int rx_event = 0; | 1324 | int rx_event = 0; |
1325 | int tx_event = 0; | 1325 | int tx_event = 0; |
1326 | 1326 | ||
1327 | if (dev == NULL) { | ||
1328 | printk(KERN_WARNING "%s: irq %d for unknown device.\n", cardname, irq); | ||
1329 | return IRQ_NONE; | ||
1330 | } | ||
1331 | |||
1332 | ioaddr = dev->base_addr; | 1327 | ioaddr = dev->base_addr; |
1333 | lp = netdev_priv(dev); | 1328 | lp = netdev_priv(dev); |
1334 | 1329 | ||
diff --git a/drivers/net/8390.c b/drivers/net/8390.c index fa3442cb1a49..3d1c599ac3cb 100644 --- a/drivers/net/8390.c +++ b/drivers/net/8390.c | |||
@@ -406,14 +406,8 @@ irqreturn_t ei_interrupt(int irq, void *dev_id) | |||
406 | int interrupts, nr_serviced = 0; | 406 | int interrupts, nr_serviced = 0; |
407 | struct ei_device *ei_local; | 407 | struct ei_device *ei_local; |
408 | 408 | ||
409 | if (dev == NULL) | ||
410 | { | ||
411 | printk ("net_interrupt(): irq %d for unknown device.\n", irq); | ||
412 | return IRQ_NONE; | ||
413 | } | ||
414 | |||
415 | e8390_base = dev->base_addr; | 409 | e8390_base = dev->base_addr; |
416 | ei_local = (struct ei_device *) netdev_priv(dev); | 410 | ei_local = netdev_priv(dev); |
417 | 411 | ||
418 | /* | 412 | /* |
419 | * Protect the irq test too. | 413 | * Protect the irq test too. |
diff --git a/drivers/net/atp.c b/drivers/net/atp.c index 062f80e20874..2d306fcb7f36 100644 --- a/drivers/net/atp.c +++ b/drivers/net/atp.c | |||
@@ -598,17 +598,13 @@ static int atp_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
598 | Handle the network interface interrupts. */ | 598 | Handle the network interface interrupts. */ |
599 | static irqreturn_t atp_interrupt(int irq, void *dev_instance) | 599 | static irqreturn_t atp_interrupt(int irq, void *dev_instance) |
600 | { | 600 | { |
601 | struct net_device *dev = (struct net_device *)dev_instance; | 601 | struct net_device *dev = dev_instance; |
602 | struct net_local *lp; | 602 | struct net_local *lp; |
603 | long ioaddr; | 603 | long ioaddr; |
604 | static int num_tx_since_rx; | 604 | static int num_tx_since_rx; |
605 | int boguscount = max_interrupt_work; | 605 | int boguscount = max_interrupt_work; |
606 | int handled = 0; | 606 | int handled = 0; |
607 | 607 | ||
608 | if (dev == NULL) { | ||
609 | printk(KERN_ERR "ATP_interrupt(): irq %d for unknown device.\n", irq); | ||
610 | return IRQ_NONE; | ||
611 | } | ||
612 | ioaddr = dev->base_addr; | 608 | ioaddr = dev->base_addr; |
613 | lp = netdev_priv(dev); | 609 | lp = netdev_priv(dev); |
614 | 610 | ||
diff --git a/drivers/net/de600.c b/drivers/net/de600.c index d9b006c9e367..690bb40b353d 100644 --- a/drivers/net/de600.c +++ b/drivers/net/de600.c | |||
@@ -265,12 +265,6 @@ static irqreturn_t de600_interrupt(int irq, void *dev_id) | |||
265 | int retrig = 0; | 265 | int retrig = 0; |
266 | int boguscount = 0; | 266 | int boguscount = 0; |
267 | 267 | ||
268 | /* This might just as well be deleted now, no crummy drivers present :-) */ | ||
269 | if ((dev == NULL) || (DE600_IRQ != irq)) { | ||
270 | printk(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"DE-600", irq); | ||
271 | return IRQ_NONE; | ||
272 | } | ||
273 | |||
274 | spin_lock(&de600_lock); | 268 | spin_lock(&de600_lock); |
275 | 269 | ||
276 | select_nic(); | 270 | select_nic(); |
diff --git a/drivers/net/declance.c b/drivers/net/declance.c index e179aa1c1ba0..00e2a8a134d7 100644 --- a/drivers/net/declance.c +++ b/drivers/net/declance.c | |||
@@ -696,7 +696,7 @@ out: | |||
696 | 696 | ||
697 | static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id) | 697 | static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id) |
698 | { | 698 | { |
699 | struct net_device *dev = (struct net_device *) dev_id; | 699 | struct net_device *dev = dev_id; |
700 | 700 | ||
701 | printk("%s: DMA error\n", dev->name); | 701 | printk("%s: DMA error\n", dev->name); |
702 | return IRQ_HANDLED; | 702 | return IRQ_HANDLED; |
@@ -704,7 +704,7 @@ static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id) | |||
704 | 704 | ||
705 | static irqreturn_t lance_interrupt(const int irq, void *dev_id) | 705 | static irqreturn_t lance_interrupt(const int irq, void *dev_id) |
706 | { | 706 | { |
707 | struct net_device *dev = (struct net_device *) dev_id; | 707 | struct net_device *dev = dev_id; |
708 | struct lance_private *lp = netdev_priv(dev); | 708 | struct lance_private *lp = netdev_priv(dev); |
709 | volatile struct lance_regs *ll = lp->ll; | 709 | volatile struct lance_regs *ll = lp->ll; |
710 | int csr0; | 710 | int csr0; |
diff --git a/drivers/net/dgrs.c b/drivers/net/dgrs.c index 6b1234b09fb3..a79520295fd0 100644 --- a/drivers/net/dgrs.c +++ b/drivers/net/dgrs.c | |||
@@ -897,8 +897,8 @@ static int dgrs_ioctl(struct net_device *devN, struct ifreq *ifr, int cmd) | |||
897 | 897 | ||
898 | static irqreturn_t dgrs_intr(int irq, void *dev_id) | 898 | static irqreturn_t dgrs_intr(int irq, void *dev_id) |
899 | { | 899 | { |
900 | struct net_device *dev0 = (struct net_device *) dev_id; | 900 | struct net_device *dev0 = dev_id; |
901 | DGRS_PRIV *priv0 = (DGRS_PRIV *) dev0->priv; | 901 | DGRS_PRIV *priv0 = dev0->priv; |
902 | I596_CB *cbp; | 902 | I596_CB *cbp; |
903 | int cmd; | 903 | int cmd; |
904 | int i; | 904 | int i; |
diff --git a/drivers/net/eepro.c b/drivers/net/eepro.c index aae454aaa1c6..a4eb0dc99ecf 100644 --- a/drivers/net/eepro.c +++ b/drivers/net/eepro.c | |||
@@ -994,16 +994,6 @@ static int eepro_open(struct net_device *dev) | |||
994 | return -EAGAIN; | 994 | return -EAGAIN; |
995 | } | 995 | } |
996 | 996 | ||
997 | #ifdef irq2dev_map | ||
998 | if (((irq2dev_map[dev->irq] != 0) | ||
999 | || (irq2dev_map[dev->irq] = dev) == 0) && | ||
1000 | (irq2dev_map[dev->irq]!=dev)) { | ||
1001 | /* printk("%s: IRQ map wrong\n", dev->name); */ | ||
1002 | free_irq(dev->irq, dev); | ||
1003 | return -EAGAIN; | ||
1004 | } | ||
1005 | #endif | ||
1006 | |||
1007 | /* Initialize the 82595. */ | 997 | /* Initialize the 82595. */ |
1008 | 998 | ||
1009 | eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */ | 999 | eepro_sw2bank2(ioaddr); /* be CAREFUL, BANK 2 now */ |
@@ -1198,17 +1188,11 @@ static int eepro_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
1198 | static irqreturn_t | 1188 | static irqreturn_t |
1199 | eepro_interrupt(int irq, void *dev_id) | 1189 | eepro_interrupt(int irq, void *dev_id) |
1200 | { | 1190 | { |
1201 | struct net_device *dev = (struct net_device *)dev_id; | 1191 | struct net_device *dev = dev_id; |
1202 | /* (struct net_device *)(irq2dev_map[irq]);*/ | ||
1203 | struct eepro_local *lp; | 1192 | struct eepro_local *lp; |
1204 | int ioaddr, status, boguscount = 20; | 1193 | int ioaddr, status, boguscount = 20; |
1205 | int handled = 0; | 1194 | int handled = 0; |
1206 | 1195 | ||
1207 | if (dev == NULL) { | ||
1208 | printk (KERN_ERR "eepro_interrupt(): irq %d for unknown device.\\n", irq); | ||
1209 | return IRQ_NONE; | ||
1210 | } | ||
1211 | |||
1212 | lp = netdev_priv(dev); | 1196 | lp = netdev_priv(dev); |
1213 | 1197 | ||
1214 | spin_lock(&lp->lock); | 1198 | spin_lock(&lp->lock); |
@@ -1288,10 +1272,6 @@ static int eepro_close(struct net_device *dev) | |||
1288 | /* release the interrupt */ | 1272 | /* release the interrupt */ |
1289 | free_irq(dev->irq, dev); | 1273 | free_irq(dev->irq, dev); |
1290 | 1274 | ||
1291 | #ifdef irq2dev_map | ||
1292 | irq2dev_map[dev->irq] = 0; | ||
1293 | #endif | ||
1294 | |||
1295 | /* Update the statistics here. What statistics? */ | 1275 | /* Update the statistics here. What statistics? */ |
1296 | 1276 | ||
1297 | return 0; | 1277 | return 0; |
diff --git a/drivers/net/eexpress.c b/drivers/net/eexpress.c index 05ca730fe81e..e14be020e562 100644 --- a/drivers/net/eexpress.c +++ b/drivers/net/eexpress.c | |||
@@ -796,13 +796,6 @@ static irqreturn_t eexp_irq(int irq, void *dev_info) | |||
796 | unsigned short ioaddr,status,ack_cmd; | 796 | unsigned short ioaddr,status,ack_cmd; |
797 | unsigned short old_read_ptr, old_write_ptr; | 797 | unsigned short old_read_ptr, old_write_ptr; |
798 | 798 | ||
799 | if (dev==NULL) | ||
800 | { | ||
801 | printk(KERN_WARNING "eexpress: irq %d for unknown device\n", | ||
802 | irq); | ||
803 | return IRQ_NONE; | ||
804 | } | ||
805 | |||
806 | lp = netdev_priv(dev); | 799 | lp = netdev_priv(dev); |
807 | ioaddr = dev->base_addr; | 800 | ioaddr = dev->base_addr; |
808 | 801 | ||
diff --git a/drivers/net/irda/ali-ircc.c b/drivers/net/irda/ali-ircc.c index 971e2dee1e6b..cebf8c374bc5 100644 --- a/drivers/net/irda/ali-ircc.c +++ b/drivers/net/irda/ali-ircc.c | |||
@@ -662,19 +662,13 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info) | |||
662 | */ | 662 | */ |
663 | static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id) | 663 | static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id) |
664 | { | 664 | { |
665 | struct net_device *dev = (struct net_device *) dev_id; | 665 | struct net_device *dev = dev_id; |
666 | struct ali_ircc_cb *self; | 666 | struct ali_ircc_cb *self; |
667 | int ret; | 667 | int ret; |
668 | 668 | ||
669 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); | 669 | IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__); |
670 | 670 | ||
671 | if (!dev) { | 671 | self = dev->priv; |
672 | IRDA_WARNING("%s: irq %d for unknown device.\n", | ||
673 | ALI_IRCC_DRIVER_NAME, irq); | ||
674 | return IRQ_NONE; | ||
675 | } | ||
676 | |||
677 | self = (struct ali_ircc_cb *) dev->priv; | ||
678 | 672 | ||
679 | spin_lock(&self->lock); | 673 | spin_lock(&self->lock); |
680 | 674 | ||
diff --git a/drivers/net/irda/donauboe.c b/drivers/net/irda/donauboe.c index 7a9128181e68..636d0630fe02 100644 --- a/drivers/net/irda/donauboe.c +++ b/drivers/net/irda/donauboe.c | |||
@@ -657,12 +657,6 @@ toshoboe_makemttpacket (struct toshoboe_cb *self, void *buf, int mtt) | |||
657 | return xbofs; | 657 | return xbofs; |
658 | } | 658 | } |
659 | 659 | ||
660 | static int toshoboe_invalid_dev(int irq) | ||
661 | { | ||
662 | printk (KERN_WARNING DRIVER_NAME ": irq %d for unknown device.\n", irq); | ||
663 | return 1; | ||
664 | } | ||
665 | |||
666 | #ifdef USE_PROBE | 660 | #ifdef USE_PROBE |
667 | /***********************************************************************/ | 661 | /***********************************************************************/ |
668 | /* Probe code */ | 662 | /* Probe code */ |
@@ -711,12 +705,9 @@ stuff_byte (__u8 byte, __u8 * buf) | |||
711 | static irqreturn_t | 705 | static irqreturn_t |
712 | toshoboe_probeinterrupt (int irq, void *dev_id) | 706 | toshoboe_probeinterrupt (int irq, void *dev_id) |
713 | { | 707 | { |
714 | struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id; | 708 | struct toshoboe_cb *self = dev_id; |
715 | __u8 irqstat; | 709 | __u8 irqstat; |
716 | 710 | ||
717 | if (self == NULL && toshoboe_invalid_dev(irq)) | ||
718 | return IRQ_NONE; | ||
719 | |||
720 | irqstat = INB (OBOE_ISR); | 711 | irqstat = INB (OBOE_ISR); |
721 | 712 | ||
722 | /* was it us */ | 713 | /* was it us */ |
diff --git a/drivers/net/irda/irport.c b/drivers/net/irda/irport.c index 6ea78ececca7..654a68b490ae 100644 --- a/drivers/net/irda/irport.c +++ b/drivers/net/irda/irport.c | |||
@@ -766,18 +766,14 @@ static inline void irport_receive(struct irport_cb *self) | |||
766 | */ | 766 | */ |
767 | static irqreturn_t irport_interrupt(int irq, void *dev_id) | 767 | static irqreturn_t irport_interrupt(int irq, void *dev_id) |
768 | { | 768 | { |
769 | struct net_device *dev = (struct net_device *) dev_id; | 769 | struct net_device *dev = dev_id; |
770 | struct irport_cb *self; | 770 | struct irport_cb *self; |
771 | int boguscount = 0; | 771 | int boguscount = 0; |
772 | int iobase; | 772 | int iobase; |
773 | int iir, lsr; | 773 | int iir, lsr; |
774 | int handled = 0; | 774 | int handled = 0; |
775 | 775 | ||
776 | if (!dev) { | 776 | self = dev->priv; |
777 | IRDA_WARNING("%s() irq %d for unknown device.\n", __FUNCTION__, irq); | ||
778 | return IRQ_NONE; | ||
779 | } | ||
780 | self = (struct irport_cb *) dev->priv; | ||
781 | 777 | ||
782 | spin_lock(&self->lock); | 778 | spin_lock(&self->lock); |
783 | 779 | ||
diff --git a/drivers/net/irda/irport.h b/drivers/net/irda/irport.h index 4393168347e3..3f46b84c6c85 100644 --- a/drivers/net/irda/irport.h +++ b/drivers/net/irda/irport.h | |||
@@ -74,7 +74,7 @@ struct irport_cb { | |||
74 | /* For piggyback drivers */ | 74 | /* For piggyback drivers */ |
75 | void *priv; | 75 | void *priv; |
76 | void (*change_speed)(void *priv, __u32 speed); | 76 | void (*change_speed)(void *priv, __u32 speed); |
77 | int (*interrupt)(int irq, void *dev_id); | 77 | irqreturn_t (*interrupt)(int irq, void *dev_id); |
78 | }; | 78 | }; |
79 | 79 | ||
80 | #endif /* IRPORT_H */ | 80 | #endif /* IRPORT_H */ |
diff --git a/drivers/net/irda/nsc-ircc.c b/drivers/net/irda/nsc-ircc.c index ea12e999814a..29b5ccd29d0b 100644 --- a/drivers/net/irda/nsc-ircc.c +++ b/drivers/net/irda/nsc-ircc.c | |||
@@ -2068,17 +2068,12 @@ static void nsc_ircc_fir_interrupt(struct nsc_ircc_cb *self, int iobase, | |||
2068 | */ | 2068 | */ |
2069 | static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id) | 2069 | static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id) |
2070 | { | 2070 | { |
2071 | struct net_device *dev = (struct net_device *) dev_id; | 2071 | struct net_device *dev = dev_id; |
2072 | struct nsc_ircc_cb *self; | 2072 | struct nsc_ircc_cb *self; |
2073 | __u8 bsr, eir; | 2073 | __u8 bsr, eir; |
2074 | int iobase; | 2074 | int iobase; |
2075 | 2075 | ||
2076 | if (!dev) { | 2076 | self = dev->priv; |
2077 | IRDA_WARNING("%s: irq %d for unknown device.\n", | ||
2078 | driver_name, irq); | ||
2079 | return IRQ_NONE; | ||
2080 | } | ||
2081 | self = (struct nsc_ircc_cb *) dev->priv; | ||
2082 | 2077 | ||
2083 | spin_lock(&self->lock); | 2078 | spin_lock(&self->lock); |
2084 | 2079 | ||
diff --git a/drivers/net/irda/w83977af_ir.c b/drivers/net/irda/w83977af_ir.c index b4fb92a7baa8..4212657fa4f9 100644 --- a/drivers/net/irda/w83977af_ir.c +++ b/drivers/net/irda/w83977af_ir.c | |||
@@ -1113,17 +1113,12 @@ static __u8 w83977af_fir_interrupt(struct w83977af_ir *self, int isr) | |||
1113 | */ | 1113 | */ |
1114 | static irqreturn_t w83977af_interrupt(int irq, void *dev_id) | 1114 | static irqreturn_t w83977af_interrupt(int irq, void *dev_id) |
1115 | { | 1115 | { |
1116 | struct net_device *dev = (struct net_device *) dev_id; | 1116 | struct net_device *dev = dev_id; |
1117 | struct w83977af_ir *self; | 1117 | struct w83977af_ir *self; |
1118 | __u8 set, icr, isr; | 1118 | __u8 set, icr, isr; |
1119 | int iobase; | 1119 | int iobase; |
1120 | 1120 | ||
1121 | if (!dev) { | 1121 | self = dev->priv; |
1122 | printk(KERN_WARNING "%s: irq %d for unknown device.\n", | ||
1123 | driver_name, irq); | ||
1124 | return IRQ_NONE; | ||
1125 | } | ||
1126 | self = (struct w83977af_ir *) dev->priv; | ||
1127 | 1122 | ||
1128 | iobase = self->io.fir_base; | 1123 | iobase = self->io.fir_base; |
1129 | 1124 | ||
diff --git a/drivers/net/lance.c b/drivers/net/lance.c index 7afac47e59ad..6efbd499d752 100644 --- a/drivers/net/lance.c +++ b/drivers/net/lance.c | |||
@@ -1019,11 +1019,6 @@ static irqreturn_t lance_interrupt(int irq, void *dev_id) | |||
1019 | int csr0, ioaddr, boguscnt=10; | 1019 | int csr0, ioaddr, boguscnt=10; |
1020 | int must_restart; | 1020 | int must_restart; |
1021 | 1021 | ||
1022 | if (dev == NULL) { | ||
1023 | printk ("lance_interrupt(): irq %d for unknown device.\n", irq); | ||
1024 | return IRQ_NONE; | ||
1025 | } | ||
1026 | |||
1027 | ioaddr = dev->base_addr; | 1022 | ioaddr = dev->base_addr; |
1028 | lp = dev->priv; | 1023 | lp = dev->priv; |
1029 | 1024 | ||
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c index e5f366910914..5ddd5742f779 100644 --- a/drivers/net/pcmcia/axnet_cs.c +++ b/drivers/net/pcmcia/axnet_cs.c | |||
@@ -1201,14 +1201,8 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id) | |||
1201 | struct ei_device *ei_local; | 1201 | struct ei_device *ei_local; |
1202 | int handled = 0; | 1202 | int handled = 0; |
1203 | 1203 | ||
1204 | if (dev == NULL) | ||
1205 | { | ||
1206 | printk ("net_interrupt(): irq %d for unknown device.\n", irq); | ||
1207 | return IRQ_NONE; | ||
1208 | } | ||
1209 | |||
1210 | e8390_base = dev->base_addr; | 1204 | e8390_base = dev->base_addr; |
1211 | ei_local = (struct ei_device *) netdev_priv(dev); | 1205 | ei_local = netdev_priv(dev); |
1212 | 1206 | ||
1213 | /* | 1207 | /* |
1214 | * Protect the irq test too. | 1208 | * Protect the irq test too. |
diff --git a/drivers/net/pcnet32.c b/drivers/net/pcnet32.c index c73e2f210774..36f9d988278f 100644 --- a/drivers/net/pcnet32.c +++ b/drivers/net/pcnet32.c | |||
@@ -2569,13 +2569,6 @@ pcnet32_interrupt(int irq, void *dev_id) | |||
2569 | u16 csr0; | 2569 | u16 csr0; |
2570 | int boguscnt = max_interrupt_work; | 2570 | int boguscnt = max_interrupt_work; |
2571 | 2571 | ||
2572 | if (!dev) { | ||
2573 | if (pcnet32_debug & NETIF_MSG_INTR) | ||
2574 | printk(KERN_DEBUG "%s(): irq %d for unknown device\n", | ||
2575 | __FUNCTION__, irq); | ||
2576 | return IRQ_NONE; | ||
2577 | } | ||
2578 | |||
2579 | ioaddr = dev->base_addr; | 2572 | ioaddr = dev->base_addr; |
2580 | lp = dev->priv; | 2573 | lp = dev->priv; |
2581 | 2574 | ||
diff --git a/drivers/net/plip.c b/drivers/net/plip.c index c0b333d2917a..71afb274498f 100644 --- a/drivers/net/plip.c +++ b/drivers/net/plip.c | |||
@@ -909,11 +909,6 @@ plip_interrupt(int irq, void *dev_id) | |||
909 | struct plip_local *rcv; | 909 | struct plip_local *rcv; |
910 | unsigned char c0; | 910 | unsigned char c0; |
911 | 911 | ||
912 | if (dev == NULL) { | ||
913 | printk(KERN_DEBUG "plip_interrupt: irq %d for unknown device.\n", irq); | ||
914 | return; | ||
915 | } | ||
916 | |||
917 | nl = netdev_priv(dev); | 912 | nl = netdev_priv(dev); |
918 | rcv = &nl->rcv_data; | 913 | rcv = &nl->rcv_data; |
919 | 914 | ||
diff --git a/drivers/net/saa9730.c b/drivers/net/saa9730.c index c9efad8a917e..b269513cde45 100644 --- a/drivers/net/saa9730.c +++ b/drivers/net/saa9730.c | |||
@@ -747,7 +747,7 @@ static int lan_saa9730_rx(struct net_device *dev) | |||
747 | 747 | ||
748 | static irqreturn_t lan_saa9730_interrupt(const int irq, void *dev_id) | 748 | static irqreturn_t lan_saa9730_interrupt(const int irq, void *dev_id) |
749 | { | 749 | { |
750 | struct net_device *dev = (struct net_device *) dev_id; | 750 | struct net_device *dev = dev_id; |
751 | struct lan_saa9730_private *lp = netdev_priv(dev); | 751 | struct lan_saa9730_private *lp = netdev_priv(dev); |
752 | 752 | ||
753 | if (lan_saa9730_debug > 5) | 753 | if (lan_saa9730_debug > 5) |
diff --git a/drivers/net/sb1000.c b/drivers/net/sb1000.c index dc30dee5537f..b9fa4fbb1398 100644 --- a/drivers/net/sb1000.c +++ b/drivers/net/sb1000.c | |||
@@ -1084,19 +1084,13 @@ static irqreturn_t sb1000_interrupt(int irq, void *dev_id) | |||
1084 | char *name; | 1084 | char *name; |
1085 | unsigned char st; | 1085 | unsigned char st; |
1086 | int ioaddr[2]; | 1086 | int ioaddr[2]; |
1087 | struct net_device *dev = (struct net_device *) dev_id; | 1087 | struct net_device *dev = dev_id; |
1088 | struct sb1000_private *lp = netdev_priv(dev); | 1088 | struct sb1000_private *lp = netdev_priv(dev); |
1089 | 1089 | ||
1090 | const unsigned char Command0[6] = {0x80, 0x2c, 0x00, 0x00, 0x00, 0x00}; | 1090 | const unsigned char Command0[6] = {0x80, 0x2c, 0x00, 0x00, 0x00, 0x00}; |
1091 | const unsigned char Command1[6] = {0x80, 0x2e, 0x00, 0x00, 0x00, 0x00}; | 1091 | const unsigned char Command1[6] = {0x80, 0x2e, 0x00, 0x00, 0x00, 0x00}; |
1092 | const int MaxRxErrorCount = 6; | 1092 | const int MaxRxErrorCount = 6; |
1093 | 1093 | ||
1094 | if (dev == NULL) { | ||
1095 | printk(KERN_ERR "sb1000_interrupt(): irq %d for unknown device.\n", | ||
1096 | irq); | ||
1097 | return IRQ_NONE; | ||
1098 | } | ||
1099 | |||
1100 | ioaddr[0] = dev->base_addr; | 1094 | ioaddr[0] = dev->base_addr; |
1101 | /* mem_start holds the second I/O address */ | 1095 | /* mem_start holds the second I/O address */ |
1102 | ioaddr[1] = dev->mem_start; | 1096 | ioaddr[1] = dev->mem_start; |
diff --git a/drivers/net/skfp/skfddi.c b/drivers/net/skfp/skfddi.c index 06ea2626c6f4..9733a11c6146 100644 --- a/drivers/net/skfp/skfddi.c +++ b/drivers/net/skfp/skfddi.c | |||
@@ -616,15 +616,10 @@ static int skfp_close(struct net_device *dev) | |||
616 | 616 | ||
617 | irqreturn_t skfp_interrupt(int irq, void *dev_id) | 617 | irqreturn_t skfp_interrupt(int irq, void *dev_id) |
618 | { | 618 | { |
619 | struct net_device *dev = (struct net_device *) dev_id; | 619 | struct net_device *dev = dev_id; |
620 | struct s_smc *smc; /* private board structure pointer */ | 620 | struct s_smc *smc; /* private board structure pointer */ |
621 | skfddi_priv *bp; | 621 | skfddi_priv *bp; |
622 | 622 | ||
623 | if (dev == NULL) { | ||
624 | printk("%s: irq %d for unknown device\n", dev->name, irq); | ||
625 | return IRQ_NONE; | ||
626 | } | ||
627 | |||
628 | smc = netdev_priv(dev); | 623 | smc = netdev_priv(dev); |
629 | bp = &smc->os; | 624 | bp = &smc->os; |
630 | 625 | ||
diff --git a/drivers/net/sonic.c b/drivers/net/sonic.c index cfece9676aff..ed7aa0a5acca 100644 --- a/drivers/net/sonic.c +++ b/drivers/net/sonic.c | |||
@@ -295,15 +295,10 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev) | |||
295 | */ | 295 | */ |
296 | static irqreturn_t sonic_interrupt(int irq, void *dev_id) | 296 | static irqreturn_t sonic_interrupt(int irq, void *dev_id) |
297 | { | 297 | { |
298 | struct net_device *dev = (struct net_device *) dev_id; | 298 | struct net_device *dev = dev_id; |
299 | struct sonic_local *lp = netdev_priv(dev); | 299 | struct sonic_local *lp = netdev_priv(dev); |
300 | int status; | 300 | int status; |
301 | 301 | ||
302 | if (dev == NULL) { | ||
303 | printk(KERN_ERR "sonic_interrupt: irq %d for unknown device.\n", irq); | ||
304 | return IRQ_NONE; | ||
305 | } | ||
306 | |||
307 | if (!(status = SONIC_READ(SONIC_ISR) & SONIC_IMR_DEFAULT)) | 302 | if (!(status = SONIC_READ(SONIC_ISR) & SONIC_IMR_DEFAULT)) |
308 | return IRQ_NONE; | 303 | return IRQ_NONE; |
309 | 304 | ||
diff --git a/drivers/net/sunhme.c b/drivers/net/sunhme.c index 45d07faf7b96..9d7cd130c19d 100644 --- a/drivers/net/sunhme.c +++ b/drivers/net/sunhme.c | |||
@@ -2095,8 +2095,8 @@ static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev) | |||
2095 | 2095 | ||
2096 | static irqreturn_t happy_meal_interrupt(int irq, void *dev_id) | 2096 | static irqreturn_t happy_meal_interrupt(int irq, void *dev_id) |
2097 | { | 2097 | { |
2098 | struct net_device *dev = (struct net_device *) dev_id; | 2098 | struct net_device *dev = dev_id; |
2099 | struct happy_meal *hp = dev->priv; | 2099 | struct happy_meal *hp = netdev_priv(dev); |
2100 | u32 happy_status = hme_read32(hp, hp->gregs + GREG_STAT); | 2100 | u32 happy_status = hme_read32(hp, hp->gregs + GREG_STAT); |
2101 | 2101 | ||
2102 | HMD(("happy_meal_interrupt: status=%08x ", happy_status)); | 2102 | HMD(("happy_meal_interrupt: status=%08x ", happy_status)); |
diff --git a/drivers/net/sunlance.c b/drivers/net/sunlance.c index 9207e19cac34..5b00d79b5573 100644 --- a/drivers/net/sunlance.c +++ b/drivers/net/sunlance.c | |||
@@ -822,7 +822,7 @@ out: | |||
822 | 822 | ||
823 | static irqreturn_t lance_interrupt(int irq, void *dev_id) | 823 | static irqreturn_t lance_interrupt(int irq, void *dev_id) |
824 | { | 824 | { |
825 | struct net_device *dev = (struct net_device *)dev_id; | 825 | struct net_device *dev = dev_id; |
826 | struct lance_private *lp = netdev_priv(dev); | 826 | struct lance_private *lp = netdev_priv(dev); |
827 | int csr0; | 827 | int csr0; |
828 | 828 | ||
diff --git a/drivers/net/sunqe.c b/drivers/net/sunqe.c index 020e78170595..7874eb1ef043 100644 --- a/drivers/net/sunqe.c +++ b/drivers/net/sunqe.c | |||
@@ -468,7 +468,7 @@ static void qe_tx_reclaim(struct sunqe *qep); | |||
468 | */ | 468 | */ |
469 | static irqreturn_t qec_interrupt(int irq, void *dev_id) | 469 | static irqreturn_t qec_interrupt(int irq, void *dev_id) |
470 | { | 470 | { |
471 | struct sunqec *qecp = (struct sunqec *) dev_id; | 471 | struct sunqec *qecp = dev_id; |
472 | u32 qec_status; | 472 | u32 qec_status; |
473 | int channel = 0; | 473 | int channel = 0; |
474 | 474 | ||
diff --git a/drivers/net/tokenring/smctr.c b/drivers/net/tokenring/smctr.c index 9bd4cba87872..46dabdb12071 100644 --- a/drivers/net/tokenring/smctr.c +++ b/drivers/net/tokenring/smctr.c | |||
@@ -1990,15 +1990,8 @@ static irqreturn_t smctr_interrupt(int irq, void *dev_id) | |||
1990 | __u8 isb_type, isb_subtype; | 1990 | __u8 isb_type, isb_subtype; |
1991 | __u16 isb_index; | 1991 | __u16 isb_index; |
1992 | 1992 | ||
1993 | if(dev == NULL) | ||
1994 | { | ||
1995 | printk(KERN_CRIT "%s: irq %d for unknown device.\n", dev->name, irq); | ||
1996 | return IRQ_NONE; | ||
1997 | } | ||
1998 | |||
1999 | ioaddr = dev->base_addr; | 1993 | ioaddr = dev->base_addr; |
2000 | tp = netdev_priv(dev); | 1994 | tp = netdev_priv(dev); |
2001 | |||
2002 | 1995 | ||
2003 | if(tp->status == NOT_INITIALIZED) | 1996 | if(tp->status == NOT_INITIALIZED) |
2004 | return IRQ_NONE; | 1997 | return IRQ_NONE; |
diff --git a/drivers/net/tokenring/tms380tr.c b/drivers/net/tokenring/tms380tr.c index c0ab6e44eb1f..ea797ca2b988 100644 --- a/drivers/net/tokenring/tms380tr.c +++ b/drivers/net/tokenring/tms380tr.c | |||
@@ -751,11 +751,6 @@ irqreturn_t tms380tr_interrupt(int irq, void *dev_id) | |||
751 | unsigned short irq_type; | 751 | unsigned short irq_type; |
752 | int handled = 0; | 752 | int handled = 0; |
753 | 753 | ||
754 | if(dev == NULL) { | ||
755 | printk(KERN_INFO "%s: irq %d for unknown device.\n", dev->name, irq); | ||
756 | return IRQ_NONE; | ||
757 | } | ||
758 | |||
759 | tp = netdev_priv(dev); | 754 | tp = netdev_priv(dev); |
760 | 755 | ||
761 | irq_type = SIFREADW(SIFSTS); | 756 | irq_type = SIFREADW(SIFSTS); |
diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index e17f9779ead2..3f4b6408b755 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c | |||
@@ -1540,16 +1540,12 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev) | |||
1540 | static irqreturn_t | 1540 | static irqreturn_t |
1541 | de4x5_interrupt(int irq, void *dev_id) | 1541 | de4x5_interrupt(int irq, void *dev_id) |
1542 | { | 1542 | { |
1543 | struct net_device *dev = (struct net_device *)dev_id; | 1543 | struct net_device *dev = dev_id; |
1544 | struct de4x5_private *lp; | 1544 | struct de4x5_private *lp; |
1545 | s32 imr, omr, sts, limit; | 1545 | s32 imr, omr, sts, limit; |
1546 | u_long iobase; | 1546 | u_long iobase; |
1547 | unsigned int handled = 0; | 1547 | unsigned int handled = 0; |
1548 | 1548 | ||
1549 | if (dev == NULL) { | ||
1550 | printk ("de4x5_interrupt(): irq %d for unknown device.\n", irq); | ||
1551 | return IRQ_NONE; | ||
1552 | } | ||
1553 | lp = netdev_priv(dev); | 1549 | lp = netdev_priv(dev); |
1554 | spin_lock(&lp->lock); | 1550 | spin_lock(&lp->lock); |
1555 | iobase = dev->base_addr; | 1551 | iobase = dev->base_addr; |
diff --git a/drivers/net/wan/cycx_main.c b/drivers/net/wan/cycx_main.c index 12363e056b63..6e5f1c898517 100644 --- a/drivers/net/wan/cycx_main.c +++ b/drivers/net/wan/cycx_main.c | |||
@@ -303,9 +303,9 @@ out: return ret; | |||
303 | */ | 303 | */ |
304 | static irqreturn_t cycx_isr(int irq, void *dev_id) | 304 | static irqreturn_t cycx_isr(int irq, void *dev_id) |
305 | { | 305 | { |
306 | struct cycx_device *card = (struct cycx_device *)dev_id; | 306 | struct cycx_device *card = dev_id; |
307 | 307 | ||
308 | if (!card || card->wandev.state == WAN_UNCONFIGURED) | 308 | if (card->wandev.state == WAN_UNCONFIGURED) |
309 | goto out; | 309 | goto out; |
310 | 310 | ||
311 | if (card->in_isr) { | 311 | if (card->in_isr) { |
diff --git a/drivers/net/wan/sdla.c b/drivers/net/wan/sdla.c index 5715d25271f1..6a485f0556f4 100644 --- a/drivers/net/wan/sdla.c +++ b/drivers/net/wan/sdla.c | |||
@@ -875,13 +875,7 @@ static irqreturn_t sdla_isr(int irq, void *dev_id) | |||
875 | 875 | ||
876 | dev = dev_id; | 876 | dev = dev_id; |
877 | 877 | ||
878 | if (dev == NULL) | 878 | flp = netdev_priv(dev); |
879 | { | ||
880 | printk(KERN_WARNING "sdla_isr(): irq %d for unknown device.\n", irq); | ||
881 | return IRQ_NONE; | ||
882 | } | ||
883 | |||
884 | flp = dev->priv; | ||
885 | 879 | ||
886 | if (!flp->initialized) | 880 | if (!flp->initialized) |
887 | { | 881 | { |
diff --git a/drivers/net/wireless/orinoco.c b/drivers/net/wireless/orinoco.c index 793da5f69344..b779c7dcc1a8 100644 --- a/drivers/net/wireless/orinoco.c +++ b/drivers/net/wireless/orinoco.c | |||
@@ -1954,7 +1954,7 @@ static void __orinoco_ev_wterr(struct net_device *dev, hermes_t *hw) | |||
1954 | 1954 | ||
1955 | irqreturn_t orinoco_interrupt(int irq, void *dev_id) | 1955 | irqreturn_t orinoco_interrupt(int irq, void *dev_id) |
1956 | { | 1956 | { |
1957 | struct net_device *dev = (struct net_device *)dev_id; | 1957 | struct net_device *dev = dev_id; |
1958 | struct orinoco_private *priv = netdev_priv(dev); | 1958 | struct orinoco_private *priv = netdev_priv(dev); |
1959 | hermes_t *hw = &priv->hw; | 1959 | hermes_t *hw = &priv->hw; |
1960 | int count = MAX_IRQLOOPS_PER_IRQ; | 1960 | int count = MAX_IRQLOOPS_PER_IRQ; |
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c index cadfe132db84..aafb301041b1 100644 --- a/drivers/net/wireless/wavelan_cs.c +++ b/drivers/net/wireless/wavelan_cs.c | |||
@@ -4119,21 +4119,12 @@ static irqreturn_t | |||
4119 | wavelan_interrupt(int irq, | 4119 | wavelan_interrupt(int irq, |
4120 | void * dev_id) | 4120 | void * dev_id) |
4121 | { | 4121 | { |
4122 | struct net_device * dev; | 4122 | struct net_device * dev = dev_id; |
4123 | net_local * lp; | 4123 | net_local * lp; |
4124 | kio_addr_t base; | 4124 | kio_addr_t base; |
4125 | int status0; | 4125 | int status0; |
4126 | u_int tx_status; | 4126 | u_int tx_status; |
4127 | 4127 | ||
4128 | if ((dev = dev_id) == NULL) | ||
4129 | { | ||
4130 | #ifdef DEBUG_INTERRUPT_ERROR | ||
4131 | printk(KERN_WARNING "wavelan_interrupt(): irq %d for unknown device.\n", | ||
4132 | irq); | ||
4133 | #endif | ||
4134 | return IRQ_NONE; | ||
4135 | } | ||
4136 | |||
4137 | #ifdef DEBUG_INTERRUPT_TRACE | 4128 | #ifdef DEBUG_INTERRUPT_TRACE |
4138 | printk(KERN_DEBUG "%s: ->wavelan_interrupt()\n", dev->name); | 4129 | printk(KERN_DEBUG "%s: ->wavelan_interrupt()\n", dev->name); |
4139 | #endif | 4130 | #endif |
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c index a1430352169b..5b98a7876982 100644 --- a/drivers/net/wireless/wl3501_cs.c +++ b/drivers/net/wireless/wl3501_cs.c | |||
@@ -1155,25 +1155,18 @@ static inline void wl3501_ack_interrupt(struct wl3501_card *this) | |||
1155 | */ | 1155 | */ |
1156 | static irqreturn_t wl3501_interrupt(int irq, void *dev_id) | 1156 | static irqreturn_t wl3501_interrupt(int irq, void *dev_id) |
1157 | { | 1157 | { |
1158 | struct net_device *dev = (struct net_device *)dev_id; | 1158 | struct net_device *dev = dev_id; |
1159 | struct wl3501_card *this; | 1159 | struct wl3501_card *this; |
1160 | int handled = 1; | ||
1161 | 1160 | ||
1162 | if (!dev) | 1161 | this = netdev_priv(dev); |
1163 | goto unknown; | ||
1164 | this = dev->priv; | ||
1165 | spin_lock(&this->lock); | 1162 | spin_lock(&this->lock); |
1166 | wl3501_ack_interrupt(this); | 1163 | wl3501_ack_interrupt(this); |
1167 | wl3501_block_interrupt(this); | 1164 | wl3501_block_interrupt(this); |
1168 | wl3501_rx_interrupt(dev); | 1165 | wl3501_rx_interrupt(dev); |
1169 | wl3501_unblock_interrupt(this); | 1166 | wl3501_unblock_interrupt(this); |
1170 | spin_unlock(&this->lock); | 1167 | spin_unlock(&this->lock); |
1171 | out: | 1168 | |
1172 | return IRQ_RETVAL(handled); | 1169 | return IRQ_HANDLED; |
1173 | unknown: | ||
1174 | handled = 0; | ||
1175 | printk(KERN_ERR "%s: irq %d for unknown device.\n", __FUNCTION__, irq); | ||
1176 | goto out; | ||
1177 | } | 1170 | } |
1178 | 1171 | ||
1179 | static int wl3501_reset_board(struct wl3501_card *this) | 1172 | static int wl3501_reset_board(struct wl3501_card *this) |
diff --git a/drivers/net/yellowfin.c b/drivers/net/yellowfin.c index ac600212d9a9..2412ce4917f2 100644 --- a/drivers/net/yellowfin.c +++ b/drivers/net/yellowfin.c | |||
@@ -896,13 +896,6 @@ static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance) | |||
896 | int boguscnt = max_interrupt_work; | 896 | int boguscnt = max_interrupt_work; |
897 | unsigned int handled = 0; | 897 | unsigned int handled = 0; |
898 | 898 | ||
899 | #ifndef final_version /* Can never occur. */ | ||
900 | if (dev == NULL) { | ||
901 | printk (KERN_ERR "yellowfin_interrupt(): irq %d for unknown device.\n", irq); | ||
902 | return IRQ_NONE; | ||
903 | } | ||
904 | #endif | ||
905 | |||
906 | yp = netdev_priv(dev); | 899 | yp = netdev_priv(dev); |
907 | ioaddr = yp->base; | 900 | ioaddr = yp->base; |
908 | 901 | ||
diff --git a/drivers/net/znet.c b/drivers/net/znet.c index 2068a109a86c..b24b0727108c 100644 --- a/drivers/net/znet.c +++ b/drivers/net/znet.c | |||
@@ -610,11 +610,6 @@ static irqreturn_t znet_interrupt(int irq, void *dev_id) | |||
610 | int boguscnt = 20; | 610 | int boguscnt = 20; |
611 | int handled = 0; | 611 | int handled = 0; |
612 | 612 | ||
613 | if (dev == NULL) { | ||
614 | printk(KERN_WARNING "znet_interrupt(): IRQ %d for unknown device.\n", irq); | ||
615 | return IRQ_NONE; | ||
616 | } | ||
617 | |||
618 | spin_lock (&znet->lock); | 613 | spin_lock (&znet->lock); |
619 | 614 | ||
620 | ioaddr = dev->base_addr; | 615 | ioaddr = dev->base_addr; |
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 991e084db2d6..7f5df9a9f393 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c | |||
@@ -66,7 +66,7 @@ static int at91_cf_ss_init(struct pcmcia_socket *s) | |||
66 | 66 | ||
67 | static irqreturn_t at91_cf_irq(int irq, void *_cf) | 67 | static irqreturn_t at91_cf_irq(int irq, void *_cf) |
68 | { | 68 | { |
69 | struct at91_cf_socket *cf = (struct at91_cf_socket *) _cf; | 69 | struct at91_cf_socket *cf = _cf; |
70 | 70 | ||
71 | if (irq == cf->board->det_pin) { | 71 | if (irq == cf->board->det_pin) { |
72 | unsigned present = at91_cf_present(cf); | 72 | unsigned present = at91_cf_present(cf); |
diff --git a/drivers/pcmcia/hd64465_ss.c b/drivers/pcmcia/hd64465_ss.c index db3c26b5de14..caca0dc9d30f 100644 --- a/drivers/pcmcia/hd64465_ss.c +++ b/drivers/pcmcia/hd64465_ss.c | |||
@@ -650,7 +650,7 @@ static int hs_set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *mem) | |||
650 | */ | 650 | */ |
651 | static int hs_irq_demux(int irq, void *dev) | 651 | static int hs_irq_demux(int irq, void *dev) |
652 | { | 652 | { |
653 | hs_socket_t *sp = (hs_socket_t *)dev; | 653 | hs_socket_t *sp = dev; |
654 | u_int cscr; | 654 | u_int cscr; |
655 | 655 | ||
656 | DPRINTK("hs_irq_demux(irq=%d)\n", irq); | 656 | DPRINTK("hs_irq_demux(irq=%d)\n", irq); |
@@ -673,11 +673,10 @@ static int hs_irq_demux(int irq, void *dev) | |||
673 | 673 | ||
674 | static irqreturn_t hs_interrupt(int irq, void *dev) | 674 | static irqreturn_t hs_interrupt(int irq, void *dev) |
675 | { | 675 | { |
676 | hs_socket_t *sp = (hs_socket_t *)dev; | 676 | hs_socket_t *sp = dev; |
677 | u_int events = 0; | 677 | u_int events = 0; |
678 | u_int cscr; | 678 | u_int cscr; |
679 | 679 | ||
680 | |||
681 | cscr = hs_in(sp, CSCR); | 680 | cscr = hs_in(sp, CSCR); |
682 | 681 | ||
683 | DPRINTK("hs_interrupt, cscr=%04x\n", cscr); | 682 | DPRINTK("hs_interrupt, cscr=%04x\n", cscr); |
diff --git a/drivers/scsi/NCR53c406a.c b/drivers/scsi/NCR53c406a.c index 3896278594c7..d4613815f685 100644 --- a/drivers/scsi/NCR53c406a.c +++ b/drivers/scsi/NCR53c406a.c | |||
@@ -168,7 +168,7 @@ enum Phase { | |||
168 | }; | 168 | }; |
169 | 169 | ||
170 | /* Static function prototypes */ | 170 | /* Static function prototypes */ |
171 | static void NCR53c406a_intr(int, void *); | 171 | static void NCR53c406a_intr(void *); |
172 | static irqreturn_t do_NCR53c406a_intr(int, void *); | 172 | static irqreturn_t do_NCR53c406a_intr(int, void *); |
173 | static void chip_init(void); | 173 | static void chip_init(void); |
174 | static void calc_port_addr(void); | 174 | static void calc_port_addr(void); |
@@ -685,7 +685,7 @@ static void wait_intr(void) | |||
685 | return; | 685 | return; |
686 | } | 686 | } |
687 | 687 | ||
688 | NCR53c406a_intr(0, NULL, NULL); | 688 | NCR53c406a_intr(NULL); |
689 | } | 689 | } |
690 | #endif | 690 | #endif |
691 | 691 | ||
@@ -767,12 +767,12 @@ static irqreturn_t do_NCR53c406a_intr(int unused, void *dev_id) | |||
767 | struct Scsi_Host *dev = dev_id; | 767 | struct Scsi_Host *dev = dev_id; |
768 | 768 | ||
769 | spin_lock_irqsave(dev->host_lock, flags); | 769 | spin_lock_irqsave(dev->host_lock, flags); |
770 | NCR53c406a_intr(0, dev_id); | 770 | NCR53c406a_intr(dev_id); |
771 | spin_unlock_irqrestore(dev->host_lock, flags); | 771 | spin_unlock_irqrestore(dev->host_lock, flags); |
772 | return IRQ_HANDLED; | 772 | return IRQ_HANDLED; |
773 | } | 773 | } |
774 | 774 | ||
775 | static void NCR53c406a_intr(int unused, void *dev_id) | 775 | static void NCR53c406a_intr(void *dev_id) |
776 | { | 776 | { |
777 | DEB(unsigned char fifo_size; | 777 | DEB(unsigned char fifo_size; |
778 | ) | 778 | ) |
diff --git a/drivers/scsi/aha152x.c b/drivers/scsi/aha152x.c index e04c2bc1932b..a0d1cee0be77 100644 --- a/drivers/scsi/aha152x.c +++ b/drivers/scsi/aha152x.c | |||
@@ -759,12 +759,7 @@ static inline Scsi_Cmnd *remove_SC(Scsi_Cmnd **SC, Scsi_Cmnd *SCp) | |||
759 | 759 | ||
760 | static irqreturn_t swintr(int irqno, void *dev_id) | 760 | static irqreturn_t swintr(int irqno, void *dev_id) |
761 | { | 761 | { |
762 | struct Scsi_Host *shpnt = (struct Scsi_Host *)dev_id; | 762 | struct Scsi_Host *shpnt = dev_id; |
763 | |||
764 | if (!shpnt) { | ||
765 | printk(KERN_ERR "aha152x: catched software interrupt %d for unknown controller.\n", irqno); | ||
766 | return IRQ_NONE; | ||
767 | } | ||
768 | 763 | ||
769 | HOSTDATA(shpnt)->swint++; | 764 | HOSTDATA(shpnt)->swint++; |
770 | 765 | ||
diff --git a/drivers/scsi/aic7xxx_old.c b/drivers/scsi/aic7xxx_old.c index 7f0adf9c4c7e..bcd7fffab907 100644 --- a/drivers/scsi/aic7xxx_old.c +++ b/drivers/scsi/aic7xxx_old.c | |||
@@ -6345,12 +6345,12 @@ aic7xxx_handle_command_completion_intr(struct aic7xxx_host *p) | |||
6345 | * SCSI controller interrupt handler. | 6345 | * SCSI controller interrupt handler. |
6346 | *-F*************************************************************************/ | 6346 | *-F*************************************************************************/ |
6347 | static void | 6347 | static void |
6348 | aic7xxx_isr(int irq, void *dev_id) | 6348 | aic7xxx_isr(void *dev_id) |
6349 | { | 6349 | { |
6350 | struct aic7xxx_host *p; | 6350 | struct aic7xxx_host *p; |
6351 | unsigned char intstat; | 6351 | unsigned char intstat; |
6352 | 6352 | ||
6353 | p = (struct aic7xxx_host *)dev_id; | 6353 | p = dev_id; |
6354 | 6354 | ||
6355 | /* | 6355 | /* |
6356 | * Just a few sanity checks. Make sure that we have an int pending. | 6356 | * Just a few sanity checks. Make sure that we have an int pending. |
@@ -6489,7 +6489,7 @@ do_aic7xxx_isr(int irq, void *dev_id) | |||
6489 | p->flags |= AHC_IN_ISR; | 6489 | p->flags |= AHC_IN_ISR; |
6490 | do | 6490 | do |
6491 | { | 6491 | { |
6492 | aic7xxx_isr(irq, dev_id); | 6492 | aic7xxx_isr(dev_id); |
6493 | } while ( (aic_inb(p, INTSTAT) & INT_PEND) ); | 6493 | } while ( (aic_inb(p, INTSTAT) & INT_PEND) ); |
6494 | aic7xxx_done_cmds_complete(p); | 6494 | aic7xxx_done_cmds_complete(p); |
6495 | aic7xxx_run_waiting_queues(p); | 6495 | aic7xxx_run_waiting_queues(p); |
@@ -10377,7 +10377,7 @@ static int __aic7xxx_bus_device_reset(struct scsi_cmnd *cmd) | |||
10377 | 10377 | ||
10378 | hscb = scb->hscb; | 10378 | hscb = scb->hscb; |
10379 | 10379 | ||
10380 | aic7xxx_isr(p->irq, (void *)p); | 10380 | aic7xxx_isr(p); |
10381 | aic7xxx_done_cmds_complete(p); | 10381 | aic7xxx_done_cmds_complete(p); |
10382 | /* If the command was already complete or just completed, then we didn't | 10382 | /* If the command was already complete or just completed, then we didn't |
10383 | * do a reset, return FAILED */ | 10383 | * do a reset, return FAILED */ |
@@ -10608,7 +10608,7 @@ static int __aic7xxx_abort(struct scsi_cmnd *cmd) | |||
10608 | else | 10608 | else |
10609 | return FAILED; | 10609 | return FAILED; |
10610 | 10610 | ||
10611 | aic7xxx_isr(p->irq, (void *)p); | 10611 | aic7xxx_isr(p); |
10612 | aic7xxx_done_cmds_complete(p); | 10612 | aic7xxx_done_cmds_complete(p); |
10613 | /* If the command was already complete or just completed, then we didn't | 10613 | /* If the command was already complete or just completed, then we didn't |
10614 | * do a reset, return FAILED */ | 10614 | * do a reset, return FAILED */ |
@@ -10863,7 +10863,7 @@ static int aic7xxx_reset(struct scsi_cmnd *cmd) | |||
10863 | 10863 | ||
10864 | while((aic_inb(p, INTSTAT) & INT_PEND) && !(p->flags & AHC_IN_ISR)) | 10864 | while((aic_inb(p, INTSTAT) & INT_PEND) && !(p->flags & AHC_IN_ISR)) |
10865 | { | 10865 | { |
10866 | aic7xxx_isr(p->irq, p); | 10866 | aic7xxx_isr(p); |
10867 | pause_sequencer(p); | 10867 | pause_sequencer(p); |
10868 | } | 10868 | } |
10869 | aic7xxx_done_cmds_complete(p); | 10869 | aic7xxx_done_cmds_complete(p); |
diff --git a/drivers/scsi/dc395x.c b/drivers/scsi/dc395x.c index 81e3ee51d897..23f5e418ab55 100644 --- a/drivers/scsi/dc395x.c +++ b/drivers/scsi/dc395x.c | |||
@@ -1815,7 +1815,7 @@ static void dc395x_handle_interrupt(struct AdapterCtlBlk *acb, | |||
1815 | 1815 | ||
1816 | static irqreturn_t dc395x_interrupt(int irq, void *dev_id) | 1816 | static irqreturn_t dc395x_interrupt(int irq, void *dev_id) |
1817 | { | 1817 | { |
1818 | struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)dev_id; | 1818 | struct AdapterCtlBlk *acb = dev_id; |
1819 | u16 scsi_status; | 1819 | u16 scsi_status; |
1820 | u8 dma_status; | 1820 | u8 dma_status; |
1821 | irqreturn_t handled = IRQ_NONE; | 1821 | irqreturn_t handled = IRQ_NONE; |
diff --git a/drivers/scsi/qlogicfas408.c b/drivers/scsi/qlogicfas408.c index 1a7de3bd796f..e0725353c99c 100644 --- a/drivers/scsi/qlogicfas408.c +++ b/drivers/scsi/qlogicfas408.c | |||
@@ -405,10 +405,10 @@ static unsigned int ql_pcmd(Scsi_Cmnd * cmd) | |||
405 | * Interrupt handler | 405 | * Interrupt handler |
406 | */ | 406 | */ |
407 | 407 | ||
408 | static void ql_ihandl(int irq, void *dev_id) | 408 | static void ql_ihandl(void *dev_id) |
409 | { | 409 | { |
410 | Scsi_Cmnd *icmd; | 410 | Scsi_Cmnd *icmd; |
411 | struct Scsi_Host *host = (struct Scsi_Host *)dev_id; | 411 | struct Scsi_Host *host = dev_id; |
412 | struct qlogicfas408_priv *priv = get_priv_by_host(host); | 412 | struct qlogicfas408_priv *priv = get_priv_by_host(host); |
413 | int qbase = priv->qbase; | 413 | int qbase = priv->qbase; |
414 | REG0; | 414 | REG0; |
@@ -438,7 +438,7 @@ irqreturn_t qlogicfas408_ihandl(int irq, void *dev_id) | |||
438 | struct Scsi_Host *host = dev_id; | 438 | struct Scsi_Host *host = dev_id; |
439 | 439 | ||
440 | spin_lock_irqsave(host->host_lock, flags); | 440 | spin_lock_irqsave(host->host_lock, flags); |
441 | ql_ihandl(irq, dev_id); | 441 | ql_ihandl(dev_id); |
442 | spin_unlock_irqrestore(host->host_lock, flags); | 442 | spin_unlock_irqrestore(host->host_lock, flags); |
443 | return IRQ_HANDLED; | 443 | return IRQ_HANDLED; |
444 | } | 444 | } |
diff --git a/drivers/scsi/tmscsim.c b/drivers/scsi/tmscsim.c index 0f0ac925d319..d03aa6ce8fe8 100644 --- a/drivers/scsi/tmscsim.c +++ b/drivers/scsi/tmscsim.c | |||
@@ -700,9 +700,9 @@ dc390_InvalidCmd(struct dc390_acb* pACB) | |||
700 | 700 | ||
701 | 701 | ||
702 | static irqreturn_t __inline__ | 702 | static irqreturn_t __inline__ |
703 | DC390_Interrupt(int irq, void *dev_id) | 703 | DC390_Interrupt(void *dev_id) |
704 | { | 704 | { |
705 | struct dc390_acb *pACB = (struct dc390_acb*)dev_id; | 705 | struct dc390_acb *pACB = dev_id; |
706 | struct dc390_dcb *pDCB; | 706 | struct dc390_dcb *pDCB; |
707 | struct dc390_srb *pSRB; | 707 | struct dc390_srb *pSRB; |
708 | u8 sstatus=0; | 708 | u8 sstatus=0; |
@@ -811,12 +811,12 @@ DC390_Interrupt(int irq, void *dev_id) | |||
811 | return IRQ_HANDLED; | 811 | return IRQ_HANDLED; |
812 | } | 812 | } |
813 | 813 | ||
814 | static irqreturn_t do_DC390_Interrupt( int irq, void *dev_id) | 814 | static irqreturn_t do_DC390_Interrupt(int irq, void *dev_id) |
815 | { | 815 | { |
816 | irqreturn_t ret; | 816 | irqreturn_t ret; |
817 | DEBUG1(printk (KERN_INFO "DC390: Irq (%i) caught: ", irq)); | 817 | DEBUG1(printk (KERN_INFO "DC390: Irq (%i) caught: ", irq)); |
818 | /* Locking is done in DC390_Interrupt */ | 818 | /* Locking is done in DC390_Interrupt */ |
819 | ret = DC390_Interrupt(irq, dev_id); | 819 | ret = DC390_Interrupt(dev_id); |
820 | DEBUG1(printk (".. IRQ returned\n")); | 820 | DEBUG1(printk (".. IRQ returned\n")); |
821 | return ret; | 821 | return ret; |
822 | } | 822 | } |
diff --git a/drivers/scsi/ultrastor.c b/drivers/scsi/ultrastor.c index 107f0fc34949..56906aba5ee3 100644 --- a/drivers/scsi/ultrastor.c +++ b/drivers/scsi/ultrastor.c | |||
@@ -287,7 +287,7 @@ static const unsigned short ultrastor_ports_14f[] = { | |||
287 | }; | 287 | }; |
288 | #endif | 288 | #endif |
289 | 289 | ||
290 | static void ultrastor_interrupt(int, void *); | 290 | static void ultrastor_interrupt(void *); |
291 | static irqreturn_t do_ultrastor_interrupt(int, void *); | 291 | static irqreturn_t do_ultrastor_interrupt(int, void *); |
292 | static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt); | 292 | static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt); |
293 | 293 | ||
@@ -893,7 +893,7 @@ static int ultrastor_abort(struct scsi_cmnd *SCpnt) | |||
893 | 893 | ||
894 | spin_lock_irqsave(host->host_lock, flags); | 894 | spin_lock_irqsave(host->host_lock, flags); |
895 | /* FIXME: Ewww... need to think about passing host around properly */ | 895 | /* FIXME: Ewww... need to think about passing host around properly */ |
896 | ultrastor_interrupt(0, NULL); | 896 | ultrastor_interrupt(NULL); |
897 | spin_unlock_irqrestore(host->host_lock, flags); | 897 | spin_unlock_irqrestore(host->host_lock, flags); |
898 | return SUCCESS; | 898 | return SUCCESS; |
899 | } | 899 | } |
@@ -1039,7 +1039,7 @@ int ultrastor_biosparam(struct scsi_device *sdev, struct block_device *bdev, | |||
1039 | return 0; | 1039 | return 0; |
1040 | } | 1040 | } |
1041 | 1041 | ||
1042 | static void ultrastor_interrupt(int irq, void *dev_id) | 1042 | static void ultrastor_interrupt(void *dev_id) |
1043 | { | 1043 | { |
1044 | unsigned int status; | 1044 | unsigned int status; |
1045 | #if ULTRASTOR_MAX_CMDS > 1 | 1045 | #if ULTRASTOR_MAX_CMDS > 1 |
@@ -1177,7 +1177,7 @@ static irqreturn_t do_ultrastor_interrupt(int irq, void *dev_id) | |||
1177 | struct Scsi_Host *dev = dev_id; | 1177 | struct Scsi_Host *dev = dev_id; |
1178 | 1178 | ||
1179 | spin_lock_irqsave(dev->host_lock, flags); | 1179 | spin_lock_irqsave(dev->host_lock, flags); |
1180 | ultrastor_interrupt(irq, dev_id); | 1180 | ultrastor_interrupt(dev_id); |
1181 | spin_unlock_irqrestore(dev->host_lock, flags); | 1181 | spin_unlock_irqrestore(dev->host_lock, flags); |
1182 | return IRQ_HANDLED; | 1182 | return IRQ_HANDLED; |
1183 | } | 1183 | } |
diff --git a/drivers/serial/68360serial.c b/drivers/serial/68360serial.c index 4e56ec803861..634ecca36a77 100644 --- a/drivers/serial/68360serial.c +++ b/drivers/serial/68360serial.c | |||
@@ -620,7 +620,7 @@ static void rs_360_interrupt(int vec, void *dev_id) | |||
620 | volatile struct smc_regs *smcp; | 620 | volatile struct smc_regs *smcp; |
621 | volatile struct scc_regs *sccp; | 621 | volatile struct scc_regs *sccp; |
622 | 622 | ||
623 | info = (ser_info_t *)dev_id; | 623 | info = dev_id; |
624 | 624 | ||
625 | idx = PORT_NUM(info->state->smc_scc_num); | 625 | idx = PORT_NUM(info->state->smc_scc_num); |
626 | if (info->state->smc_scc_num & NUM_IS_SCC) { | 626 | if (info->state->smc_scc_num & NUM_IS_SCC) { |
diff --git a/drivers/serial/jsm/jsm_neo.c b/drivers/serial/jsm/jsm_neo.c index 8fa31e68989a..8be8da37f629 100644 --- a/drivers/serial/jsm/jsm_neo.c +++ b/drivers/serial/jsm/jsm_neo.c | |||
@@ -1116,7 +1116,7 @@ static void neo_param(struct jsm_channel *ch) | |||
1116 | */ | 1116 | */ |
1117 | static irqreturn_t neo_intr(int irq, void *voidbrd) | 1117 | static irqreturn_t neo_intr(int irq, void *voidbrd) |
1118 | { | 1118 | { |
1119 | struct jsm_board *brd = (struct jsm_board *) voidbrd; | 1119 | struct jsm_board *brd = voidbrd; |
1120 | struct jsm_channel *ch; | 1120 | struct jsm_channel *ch; |
1121 | int port = 0; | 1121 | int port = 0; |
1122 | int type = 0; | 1122 | int type = 0; |
diff --git a/drivers/serial/mpc52xx_uart.c b/drivers/serial/mpc52xx_uart.c index 039c2fd6d496..4f80c5b4a753 100644 --- a/drivers/serial/mpc52xx_uart.c +++ b/drivers/serial/mpc52xx_uart.c | |||
@@ -512,19 +512,11 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port) | |||
512 | static irqreturn_t | 512 | static irqreturn_t |
513 | mpc52xx_uart_int(int irq, void *dev_id) | 513 | mpc52xx_uart_int(int irq, void *dev_id) |
514 | { | 514 | { |
515 | struct uart_port *port = (struct uart_port *) dev_id; | 515 | struct uart_port *port = dev_id; |
516 | unsigned long pass = ISR_PASS_LIMIT; | 516 | unsigned long pass = ISR_PASS_LIMIT; |
517 | unsigned int keepgoing; | 517 | unsigned int keepgoing; |
518 | unsigned short status; | 518 | unsigned short status; |
519 | 519 | ||
520 | if ( irq != port->irq ) { | ||
521 | printk( KERN_WARNING | ||
522 | "mpc52xx_uart_int : " \ | ||
523 | "Received wrong int %d. Waiting for %d\n", | ||
524 | irq, port->irq); | ||
525 | return IRQ_NONE; | ||
526 | } | ||
527 | |||
528 | spin_lock(&port->lock); | 520 | spin_lock(&port->lock); |
529 | 521 | ||
530 | /* While we have stuff to do, we continue */ | 522 | /* While we have stuff to do, we continue */ |
diff --git a/drivers/serial/netx-serial.c b/drivers/serial/netx-serial.c index e92d7e1c22cf..062bad457b1a 100644 --- a/drivers/serial/netx-serial.c +++ b/drivers/serial/netx-serial.c | |||
@@ -247,7 +247,7 @@ static void netx_rxint(struct uart_port *port) | |||
247 | 247 | ||
248 | static irqreturn_t netx_int(int irq, void *dev_id) | 248 | static irqreturn_t netx_int(int irq, void *dev_id) |
249 | { | 249 | { |
250 | struct uart_port *port = (struct uart_port *)dev_id; | 250 | struct uart_port *port = dev_id; |
251 | unsigned long flags; | 251 | unsigned long flags; |
252 | unsigned char status; | 252 | unsigned char status; |
253 | 253 | ||
diff --git a/drivers/serial/pxa.c b/drivers/serial/pxa.c index 846089f222d4..415fe9633a9b 100644 --- a/drivers/serial/pxa.c +++ b/drivers/serial/pxa.c | |||
@@ -232,7 +232,7 @@ static inline void check_modem_status(struct uart_pxa_port *up) | |||
232 | */ | 232 | */ |
233 | static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id) | 233 | static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id) |
234 | { | 234 | { |
235 | struct uart_pxa_port *up = (struct uart_pxa_port *)dev_id; | 235 | struct uart_pxa_port *up = dev_id; |
236 | unsigned int iir, lsr; | 236 | unsigned int iir, lsr; |
237 | 237 | ||
238 | iir = serial_in(up, UART_IIR); | 238 | iir = serial_in(up, UART_IIR); |
diff --git a/drivers/sn/ioc3.c b/drivers/sn/ioc3.c index 3d91b6b9287d..cd6b65333b71 100644 --- a/drivers/sn/ioc3.c +++ b/drivers/sn/ioc3.c | |||
@@ -401,7 +401,7 @@ static inline uint32_t get_pending_intrs(struct ioc3_driver_data *idd) | |||
401 | static irqreturn_t ioc3_intr_io(int irq, void *arg) | 401 | static irqreturn_t ioc3_intr_io(int irq, void *arg) |
402 | { | 402 | { |
403 | unsigned long flags; | 403 | unsigned long flags; |
404 | struct ioc3_driver_data *idd = (struct ioc3_driver_data *)arg; | 404 | struct ioc3_driver_data *idd = arg; |
405 | int handled = 1, id; | 405 | int handled = 1, id; |
406 | unsigned int pending; | 406 | unsigned int pending; |
407 | 407 | ||
diff --git a/drivers/spi/pxa2xx_spi.c b/drivers/spi/pxa2xx_spi.c index 77122edeb206..72025df5561d 100644 --- a/drivers/spi/pxa2xx_spi.c +++ b/drivers/spi/pxa2xx_spi.c | |||
@@ -669,7 +669,7 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data) | |||
669 | 669 | ||
670 | static irqreturn_t ssp_int(int irq, void *dev_id) | 670 | static irqreturn_t ssp_int(int irq, void *dev_id) |
671 | { | 671 | { |
672 | struct driver_data *drv_data = (struct driver_data *)dev_id; | 672 | struct driver_data *drv_data = dev_id; |
673 | void *reg = drv_data->ioaddr; | 673 | void *reg = drv_data->ioaddr; |
674 | 674 | ||
675 | if (!drv_data->cur_msg) { | 675 | if (!drv_data->cur_msg) { |