diff options
94 files changed, 202 insertions, 424 deletions
diff --git a/arch/alpha/kernel/proto.h b/arch/alpha/kernel/proto.h index daccd4b6d28..95912ecc65e 100644 --- a/arch/alpha/kernel/proto.h +++ b/arch/alpha/kernel/proto.h | |||
@@ -36,7 +36,7 @@ extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t); | |||
36 | extern struct pci_ops irongate_pci_ops; | 36 | extern struct pci_ops irongate_pci_ops; |
37 | extern int irongate_pci_clr_err(void); | 37 | extern int irongate_pci_clr_err(void); |
38 | extern void irongate_init_arch(void); | 38 | extern void irongate_init_arch(void); |
39 | extern void irongate_machine_check(u64, u64, struct pt_regs *); | 39 | extern void irongate_machine_check(u64, u64); |
40 | #define irongate_pci_tbi ((void *)0) | 40 | #define irongate_pci_tbi ((void *)0) |
41 | 41 | ||
42 | /* core_lca.c */ | 42 | /* core_lca.c */ |
diff --git a/arch/alpha/kernel/sys_titan.c b/arch/alpha/kernel/sys_titan.c index 161d6915dc4..29ab7db81c3 100644 --- a/arch/alpha/kernel/sys_titan.c +++ b/arch/alpha/kernel/sys_titan.c | |||
@@ -204,7 +204,7 @@ static struct hw_interrupt_type titan_irq_type = { | |||
204 | }; | 204 | }; |
205 | 205 | ||
206 | static irqreturn_t | 206 | static irqreturn_t |
207 | titan_intr_nop(int irq, void *dev_id, struct pt_regs *regs) | 207 | titan_intr_nop(int irq, void *dev_id) |
208 | { | 208 | { |
209 | /* | 209 | /* |
210 | * This is a NOP interrupt handler for the purposes of | 210 | * This is a NOP interrupt handler for the purposes of |
diff --git a/arch/i386/kernel/time.c b/arch/i386/kernel/time.c index 3f221f5eb47..78af572fd17 100644 --- a/arch/i386/kernel/time.c +++ b/arch/i386/kernel/time.c | |||
@@ -201,8 +201,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id) | |||
201 | high bit of the PPI port B (0x61). Note that some PS/2s, | 201 | high bit of the PPI port B (0x61). Note that some PS/2s, |
202 | notably the 55SX, work fine if this is removed. */ | 202 | notably the 55SX, work fine if this is removed. */ |
203 | 203 | ||
204 | irq = inb_p( 0x61 ); /* read the current state */ | 204 | u8 irq_v = inb_p( 0x61 ); /* read the current state */ |
205 | outb_p( irq|0x80, 0x61 ); /* reset the IRQ */ | 205 | outb_p( irq_v|0x80, 0x61 ); /* reset the IRQ */ |
206 | } | 206 | } |
207 | 207 | ||
208 | write_sequnlock(&xtime_lock); | 208 | write_sequnlock(&xtime_lock); |
diff --git a/arch/ia64/sn/kernel/huberror.c b/arch/ia64/sn/kernel/huberror.c index 96fb81e6321..abca6bd7962 100644 --- a/arch/ia64/sn/kernel/huberror.c +++ b/arch/ia64/sn/kernel/huberror.c | |||
@@ -22,7 +22,7 @@ | |||
22 | void hubiio_crb_error_handler(struct hubdev_info *hubdev_info); | 22 | void hubiio_crb_error_handler(struct hubdev_info *hubdev_info); |
23 | extern void bte_crb_error_handler(cnodeid_t, int, int, ioerror_t *, | 23 | extern void bte_crb_error_handler(cnodeid_t, int, int, ioerror_t *, |
24 | int); | 24 | int); |
25 | static irqreturn_t hub_eint_handler(int irq, void *arg, struct pt_regs *ep) | 25 | static irqreturn_t hub_eint_handler(int irq, void *arg) |
26 | { | 26 | { |
27 | struct hubdev_info *hubdev_info; | 27 | struct hubdev_info *hubdev_info; |
28 | struct ia64_sal_retval ret_stuff; | 28 | struct ia64_sal_retval ret_stuff; |
@@ -178,7 +178,7 @@ void hubiio_crb_error_handler(struct hubdev_info *hubdev_info) | |||
178 | */ | 178 | */ |
179 | void hub_error_init(struct hubdev_info *hubdev_info) | 179 | void hub_error_init(struct hubdev_info *hubdev_info) |
180 | { | 180 | { |
181 | if (request_irq(SGI_II_ERROR, (void *)hub_eint_handler, IRQF_SHARED, | 181 | if (request_irq(SGI_II_ERROR, hub_eint_handler, IRQF_SHARED, |
182 | "SN_hub_error", (void *)hubdev_info)) | 182 | "SN_hub_error", (void *)hubdev_info)) |
183 | printk("hub_error_init: Failed to request_irq for 0x%p\n", | 183 | printk("hub_error_init: Failed to request_irq for 0x%p\n", |
184 | hubdev_info); | 184 | hubdev_info); |
diff --git a/arch/ia64/sn/pci/pcibr/pcibr_provider.c b/arch/ia64/sn/pci/pcibr/pcibr_provider.c index 838c93c9a16..27dd7df0f44 100644 --- a/arch/ia64/sn/pci/pcibr/pcibr_provider.c +++ b/arch/ia64/sn/pci/pcibr/pcibr_provider.c | |||
@@ -95,7 +95,7 @@ u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus) | |||
95 | * bridge sends an error interrupt. | 95 | * bridge sends an error interrupt. |
96 | */ | 96 | */ |
97 | static irqreturn_t | 97 | static irqreturn_t |
98 | pcibr_error_intr_handler(int irq, void *arg, struct pt_regs *regs) | 98 | pcibr_error_intr_handler(int irq, void *arg) |
99 | { | 99 | { |
100 | struct pcibus_info *soft = (struct pcibus_info *)arg; | 100 | struct pcibus_info *soft = (struct pcibus_info *)arg; |
101 | 101 | ||
@@ -138,7 +138,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont | |||
138 | /* | 138 | /* |
139 | * register the bridge's error interrupt handler | 139 | * register the bridge's error interrupt handler |
140 | */ | 140 | */ |
141 | if (request_irq(SGI_PCIASIC_ERROR, (void *)pcibr_error_intr_handler, | 141 | if (request_irq(SGI_PCIASIC_ERROR, pcibr_error_intr_handler, |
142 | IRQF_SHARED, "PCIBR error", (void *)(soft))) { | 142 | IRQF_SHARED, "PCIBR error", (void *)(soft))) { |
143 | printk(KERN_WARNING | 143 | printk(KERN_WARNING |
144 | "pcibr cannot allocate interrupt for error handler\n"); | 144 | "pcibr cannot allocate interrupt for error handler\n"); |
diff --git a/arch/powerpc/kernel/irq.c b/arch/powerpc/kernel/irq.c index 829ac18b566..5e37bf14ef2 100644 --- a/arch/powerpc/kernel/irq.c +++ b/arch/powerpc/kernel/irq.c | |||
@@ -572,8 +572,8 @@ unsigned int irq_create_mapping(struct irq_host *host, | |||
572 | } | 572 | } |
573 | EXPORT_SYMBOL_GPL(irq_create_mapping); | 573 | EXPORT_SYMBOL_GPL(irq_create_mapping); |
574 | 574 | ||
575 | extern unsigned int irq_create_of_mapping(struct device_node *controller, | 575 | unsigned int irq_create_of_mapping(struct device_node *controller, |
576 | u32 *intspec, unsigned int intsize) | 576 | u32 *intspec, unsigned int intsize) |
577 | { | 577 | { |
578 | struct irq_host *host; | 578 | struct irq_host *host; |
579 | irq_hw_number_t hwirq; | 579 | irq_hw_number_t hwirq; |
diff --git a/arch/powerpc/platforms/pasemi/pci.c b/arch/powerpc/platforms/pasemi/pci.c index 4679c523041..39020c1fa13 100644 --- a/arch/powerpc/platforms/pasemi/pci.c +++ b/arch/powerpc/platforms/pasemi/pci.c | |||
@@ -35,17 +35,17 @@ | |||
35 | 35 | ||
36 | #define CONFIG_OFFSET_VALID(off) ((off) < 4096) | 36 | #define CONFIG_OFFSET_VALID(off) ((off) < 4096) |
37 | 37 | ||
38 | static unsigned long pa_pxp_cfg_addr(struct pci_controller *hose, | 38 | static void volatile __iomem *pa_pxp_cfg_addr(struct pci_controller *hose, |
39 | u8 bus, u8 devfn, int offset) | 39 | u8 bus, u8 devfn, int offset) |
40 | { | 40 | { |
41 | return ((unsigned long)hose->cfg_data) + PA_PXP_CFA(bus, devfn, offset); | 41 | return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset); |
42 | } | 42 | } |
43 | 43 | ||
44 | static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, | 44 | static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, |
45 | int offset, int len, u32 *val) | 45 | int offset, int len, u32 *val) |
46 | { | 46 | { |
47 | struct pci_controller *hose; | 47 | struct pci_controller *hose; |
48 | unsigned long addr; | 48 | void volatile __iomem *addr; |
49 | 49 | ||
50 | hose = pci_bus_to_host(bus); | 50 | hose = pci_bus_to_host(bus); |
51 | if (!hose) | 51 | if (!hose) |
@@ -62,13 +62,13 @@ static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn, | |||
62 | */ | 62 | */ |
63 | switch (len) { | 63 | switch (len) { |
64 | case 1: | 64 | case 1: |
65 | *val = in_8((u8 *)addr); | 65 | *val = in_8(addr); |
66 | break; | 66 | break; |
67 | case 2: | 67 | case 2: |
68 | *val = in_le16((u16 *)addr); | 68 | *val = in_le16(addr); |
69 | break; | 69 | break; |
70 | default: | 70 | default: |
71 | *val = in_le32((u32 *)addr); | 71 | *val = in_le32(addr); |
72 | break; | 72 | break; |
73 | } | 73 | } |
74 | 74 | ||
@@ -79,7 +79,7 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
79 | int offset, int len, u32 val) | 79 | int offset, int len, u32 val) |
80 | { | 80 | { |
81 | struct pci_controller *hose; | 81 | struct pci_controller *hose; |
82 | unsigned long addr; | 82 | void volatile __iomem *addr; |
83 | 83 | ||
84 | hose = pci_bus_to_host(bus); | 84 | hose = pci_bus_to_host(bus); |
85 | if (!hose) | 85 | if (!hose) |
@@ -96,16 +96,16 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn, | |||
96 | */ | 96 | */ |
97 | switch (len) { | 97 | switch (len) { |
98 | case 1: | 98 | case 1: |
99 | out_8((u8 *)addr, val); | 99 | out_8(addr, val); |
100 | (void) in_8((u8 *)addr); | 100 | (void) in_8(addr); |
101 | break; | 101 | break; |
102 | case 2: | 102 | case 2: |
103 | out_le16((u16 *)addr, val); | 103 | out_le16(addr, val); |
104 | (void) in_le16((u16 *)addr); | 104 | (void) in_le16(addr); |
105 | break; | 105 | break; |
106 | default: | 106 | default: |
107 | out_le32((u32 *)addr, val); | 107 | out_le32(addr, val); |
108 | (void) in_le32((u32 *)addr); | 108 | (void) in_le32(addr); |
109 | break; | 109 | break; |
110 | } | 110 | } |
111 | return PCIBIOS_SUCCESSFUL; | 111 | return PCIBIOS_SUCCESSFUL; |
diff --git a/arch/ppc/syslib/mv64360_pic.c b/arch/ppc/syslib/mv64360_pic.c index 3f6d162f87c..5104386601e 100644 --- a/arch/ppc/syslib/mv64360_pic.c +++ b/arch/ppc/syslib/mv64360_pic.c | |||
@@ -380,7 +380,7 @@ mv64360_register_hdlrs(void) | |||
380 | /* Clear old errors and register CPU interface error intr handler */ | 380 | /* Clear old errors and register CPU interface error intr handler */ |
381 | mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0); | 381 | mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0); |
382 | if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base, | 382 | if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base, |
383 | mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0))) | 383 | mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, NULL))) |
384 | printk(KERN_WARNING "Can't register cpu error handler: %d", rc); | 384 | printk(KERN_WARNING "Can't register cpu error handler: %d", rc); |
385 | 385 | ||
386 | mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); | 386 | mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0); |
@@ -389,7 +389,7 @@ mv64360_register_hdlrs(void) | |||
389 | /* Clear old errors and register internal SRAM error intr handler */ | 389 | /* Clear old errors and register internal SRAM error intr handler */ |
390 | mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0); | 390 | mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0); |
391 | if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base, | 391 | if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base, |
392 | mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, 0))) | 392 | mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, NULL))) |
393 | printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); | 393 | printk(KERN_WARNING "Can't register SRAM error handler: %d",rc); |
394 | 394 | ||
395 | /* Clear old errors and register PCI 0 error intr handler */ | 395 | /* Clear old errors and register PCI 0 error intr handler */ |
diff --git a/arch/s390/kernel/traps.c b/arch/s390/kernel/traps.c index 05bf3cc8530..66375a5e3d1 100644 --- a/arch/s390/kernel/traps.c +++ b/arch/s390/kernel/traps.c | |||
@@ -474,7 +474,7 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | |||
474 | signal = math_emu_b3(opcode, regs); | 474 | signal = math_emu_b3(opcode, regs); |
475 | } else if (opcode[0] == 0xed) { | 475 | } else if (opcode[0] == 0xed) { |
476 | get_user(*((__u32 *) (opcode+2)), | 476 | get_user(*((__u32 *) (opcode+2)), |
477 | (__u32 *)(location+1)); | 477 | (__u32 __user *)(location+1)); |
478 | signal = math_emu_ed(opcode, regs); | 478 | signal = math_emu_ed(opcode, regs); |
479 | } else if (*((__u16 *) opcode) == 0xb299) { | 479 | } else if (*((__u16 *) opcode) == 0xb299) { |
480 | get_user(*((__u16 *) (opcode+2)), location+1); | 480 | get_user(*((__u16 *) (opcode+2)), location+1); |
@@ -499,7 +499,7 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code) | |||
499 | info.si_signo = signal; | 499 | info.si_signo = signal; |
500 | info.si_errno = 0; | 500 | info.si_errno = 0; |
501 | info.si_code = SEGV_MAPERR; | 501 | info.si_code = SEGV_MAPERR; |
502 | info.si_addr = (void *) location; | 502 | info.si_addr = (void __user *) location; |
503 | do_trap(interruption_code, signal, | 503 | do_trap(interruption_code, signal, |
504 | "user address fault", regs, &info); | 504 | "user address fault", regs, &info); |
505 | } else | 505 | } else |
@@ -520,10 +520,10 @@ asmlinkage void | |||
520 | specification_exception(struct pt_regs * regs, long interruption_code) | 520 | specification_exception(struct pt_regs * regs, long interruption_code) |
521 | { | 521 | { |
522 | __u8 opcode[6]; | 522 | __u8 opcode[6]; |
523 | __u16 *location = NULL; | 523 | __u16 __user *location = NULL; |
524 | int signal = 0; | 524 | int signal = 0; |
525 | 525 | ||
526 | location = (__u16 *) get_check_address(regs); | 526 | location = (__u16 __user *) get_check_address(regs); |
527 | 527 | ||
528 | /* | 528 | /* |
529 | * We got all needed information from the lowcore and can | 529 | * We got all needed information from the lowcore and can |
@@ -632,7 +632,7 @@ asmlinkage void data_exception(struct pt_regs * regs, long interruption_code) | |||
632 | break; | 632 | break; |
633 | case 0xed: | 633 | case 0xed: |
634 | get_user(*((__u32 *) (opcode+2)), | 634 | get_user(*((__u32 *) (opcode+2)), |
635 | (__u32 *)(location+1)); | 635 | (__u32 __user *)(location+1)); |
636 | signal = math_emu_ed(opcode, regs); | 636 | signal = math_emu_ed(opcode, regs); |
637 | break; | 637 | break; |
638 | case 0xb2: | 638 | case 0xb2: |
diff --git a/arch/sparc64/kernel/irq.c b/arch/sparc64/kernel/irq.c index ce05deb1bc9..d64b1ea848d 100644 --- a/arch/sparc64/kernel/irq.c +++ b/arch/sparc64/kernel/irq.c | |||
@@ -522,12 +522,13 @@ void ack_bad_irq(unsigned int virt_irq) | |||
522 | } | 522 | } |
523 | 523 | ||
524 | #ifndef CONFIG_SMP | 524 | #ifndef CONFIG_SMP |
525 | extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *); | 525 | extern irqreturn_t timer_interrupt(int, void *); |
526 | 526 | ||
527 | void timer_irq(int irq, struct pt_regs *regs) | 527 | void timer_irq(int irq, struct pt_regs *regs) |
528 | { | 528 | { |
529 | unsigned long clr_mask = 1 << irq; | 529 | unsigned long clr_mask = 1 << irq; |
530 | unsigned long tick_mask = tick_ops->softint_mask; | 530 | unsigned long tick_mask = tick_ops->softint_mask; |
531 | struct pt_regs *old_regs; | ||
531 | 532 | ||
532 | if (get_softint() & tick_mask) { | 533 | if (get_softint() & tick_mask) { |
533 | irq = 0; | 534 | irq = 0; |
@@ -535,12 +536,14 @@ void timer_irq(int irq, struct pt_regs *regs) | |||
535 | } | 536 | } |
536 | clear_softint(clr_mask); | 537 | clear_softint(clr_mask); |
537 | 538 | ||
539 | old_regs = set_irq_regs(regs); | ||
538 | irq_enter(); | 540 | irq_enter(); |
539 | 541 | ||
540 | kstat_this_cpu.irqs[0]++; | 542 | kstat_this_cpu.irqs[0]++; |
541 | timer_interrupt(irq, NULL, regs); | 543 | timer_interrupt(irq, NULL); |
542 | 544 | ||
543 | irq_exit(); | 545 | irq_exit(); |
546 | set_irq_regs(old_regs); | ||
544 | } | 547 | } |
545 | #endif | 548 | #endif |
546 | 549 | ||
diff --git a/arch/sparc64/kernel/time.c b/arch/sparc64/kernel/time.c index 00f6fc4aaaf..061e1b1fa58 100644 --- a/arch/sparc64/kernel/time.c +++ b/arch/sparc64/kernel/time.c | |||
@@ -45,6 +45,7 @@ | |||
45 | #include <asm/cpudata.h> | 45 | #include <asm/cpudata.h> |
46 | #include <asm/uaccess.h> | 46 | #include <asm/uaccess.h> |
47 | #include <asm/prom.h> | 47 | #include <asm/prom.h> |
48 | #include <asm/irq_regs.h> | ||
48 | 49 | ||
49 | DEFINE_SPINLOCK(mostek_lock); | 50 | DEFINE_SPINLOCK(mostek_lock); |
50 | DEFINE_SPINLOCK(rtc_lock); | 51 | DEFINE_SPINLOCK(rtc_lock); |
@@ -452,7 +453,7 @@ static inline void timer_check_rtc(void) | |||
452 | } | 453 | } |
453 | } | 454 | } |
454 | 455 | ||
455 | irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) | 456 | irqreturn_t timer_interrupt(int irq, void *dev_id) |
456 | { | 457 | { |
457 | unsigned long ticks, compare, pstate; | 458 | unsigned long ticks, compare, pstate; |
458 | 459 | ||
@@ -460,8 +461,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs) | |||
460 | 461 | ||
461 | do { | 462 | do { |
462 | #ifndef CONFIG_SMP | 463 | #ifndef CONFIG_SMP |
463 | profile_tick(CPU_PROFILING, regs); | 464 | profile_tick(CPU_PROFILING); |
464 | update_process_times(user_mode(regs)); | 465 | update_process_times(user_mode(get_irq_regs())); |
465 | #endif | 466 | #endif |
466 | do_timer(1); | 467 | do_timer(1); |
467 | 468 | ||
diff --git a/drivers/atm/ambassador.c b/drivers/atm/ambassador.c index 8ff5c4e5082..323592de047 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 33e9ee47392..f59349206dd 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 8895f026bea..267825501df 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 3e8ab84b944..742d0740310 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 60e1978ec0e..f574962f428 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 6b039186856..9e7283bd81a 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 3bea594600d..c382df0f82f 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 0bd09040a5c..eeda40c5e18 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 be68cfb0ae6..5ab32b38f45 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 6022495571a..d0b88d0e87f 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 3014495b7ff..3cac2373934 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 d9d5020a222..168e431d7c7 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/misc/tifm_7xx1.c b/drivers/misc/tifm_7xx1.c index b1748669e05..1ba8754e938 100644 --- a/drivers/misc/tifm_7xx1.c +++ b/drivers/misc/tifm_7xx1.c | |||
@@ -48,7 +48,7 @@ static void tifm_7xx1_remove_media(void *adapter) | |||
48 | printk(KERN_INFO DRIVER_NAME | 48 | printk(KERN_INFO DRIVER_NAME |
49 | ": demand removing card from socket %d\n", cnt); | 49 | ": demand removing card from socket %d\n", cnt); |
50 | sock = fm->sockets[cnt]; | 50 | sock = fm->sockets[cnt]; |
51 | fm->sockets[cnt] = 0; | 51 | fm->sockets[cnt] = NULL; |
52 | fm->remove_mask &= ~(1 << cnt); | 52 | fm->remove_mask &= ~(1 << cnt); |
53 | 53 | ||
54 | writel(0x0e00, sock->addr + SOCK_CONTROL); | 54 | writel(0x0e00, sock->addr + SOCK_CONTROL); |
@@ -118,7 +118,7 @@ static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id) | |||
118 | return IRQ_HANDLED; | 118 | return IRQ_HANDLED; |
119 | } | 119 | } |
120 | 120 | ||
121 | static tifm_media_id tifm_7xx1_toggle_sock_power(char *sock_addr, int is_x2) | 121 | static tifm_media_id tifm_7xx1_toggle_sock_power(char __iomem *sock_addr, int is_x2) |
122 | { | 122 | { |
123 | unsigned int s_state; | 123 | unsigned int s_state; |
124 | int cnt; | 124 | int cnt; |
@@ -163,7 +163,8 @@ static tifm_media_id tifm_7xx1_toggle_sock_power(char *sock_addr, int is_x2) | |||
163 | return (readl(sock_addr + SOCK_PRESENT_STATE) >> 4) & 7; | 163 | return (readl(sock_addr + SOCK_PRESENT_STATE) >> 4) & 7; |
164 | } | 164 | } |
165 | 165 | ||
166 | inline static char *tifm_7xx1_sock_addr(char *base_addr, unsigned int sock_num) | 166 | inline static char __iomem * |
167 | tifm_7xx1_sock_addr(char __iomem *base_addr, unsigned int sock_num) | ||
167 | { | 168 | { |
168 | return base_addr + ((sock_num + 1) << 10); | 169 | return base_addr + ((sock_num + 1) << 10); |
169 | } | 170 | } |
@@ -176,7 +177,7 @@ static void tifm_7xx1_insert_media(void *adapter) | |||
176 | char *card_name = "xx"; | 177 | char *card_name = "xx"; |
177 | int cnt, ok_to_register; | 178 | int cnt, ok_to_register; |
178 | unsigned int insert_mask; | 179 | unsigned int insert_mask; |
179 | struct tifm_dev *new_sock = 0; | 180 | struct tifm_dev *new_sock = NULL; |
180 | 181 | ||
181 | if (!class_device_get(&fm->cdev)) | 182 | if (!class_device_get(&fm->cdev)) |
182 | return; | 183 | return; |
@@ -230,7 +231,7 @@ static void tifm_7xx1_insert_media(void *adapter) | |||
230 | if (!ok_to_register || | 231 | if (!ok_to_register || |
231 | device_register(&new_sock->dev)) { | 232 | device_register(&new_sock->dev)) { |
232 | spin_lock_irqsave(&fm->lock, flags); | 233 | spin_lock_irqsave(&fm->lock, flags); |
233 | fm->sockets[cnt] = 0; | 234 | fm->sockets[cnt] = NULL; |
234 | spin_unlock_irqrestore(&fm->lock, | 235 | spin_unlock_irqrestore(&fm->lock, |
235 | flags); | 236 | flags); |
236 | tifm_free_device(&new_sock->dev); | 237 | tifm_free_device(&new_sock->dev); |
@@ -390,7 +391,7 @@ static void tifm_7xx1_remove(struct pci_dev *dev) | |||
390 | 391 | ||
391 | tifm_remove_adapter(fm); | 392 | tifm_remove_adapter(fm); |
392 | 393 | ||
393 | pci_set_drvdata(dev, 0); | 394 | pci_set_drvdata(dev, NULL); |
394 | 395 | ||
395 | iounmap(fm->addr); | 396 | iounmap(fm->addr); |
396 | pci_intx(dev, 0); | 397 | pci_intx(dev, 0); |
diff --git a/drivers/misc/tifm_core.c b/drivers/misc/tifm_core.c index cca5f852246..ee326136d03 100644 --- a/drivers/misc/tifm_core.c +++ b/drivers/misc/tifm_core.c | |||
@@ -157,7 +157,7 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id) | |||
157 | dev->wq = create_singlethread_workqueue(dev->wq_name); | 157 | dev->wq = create_singlethread_workqueue(dev->wq_name); |
158 | if (!dev->wq) { | 158 | if (!dev->wq) { |
159 | kfree(dev); | 159 | kfree(dev); |
160 | return 0; | 160 | return NULL; |
161 | } | 161 | } |
162 | dev->dev.parent = fm->dev; | 162 | dev->dev.parent = fm->dev; |
163 | dev->dev.bus = &tifm_bus_type; | 163 | dev->dev.bus = &tifm_bus_type; |
diff --git a/drivers/mmc/tifm_sd.c b/drivers/mmc/tifm_sd.c index 6d23dc08d16..2bacff60913 100644 --- a/drivers/mmc/tifm_sd.c +++ b/drivers/mmc/tifm_sd.c | |||
@@ -501,13 +501,13 @@ static void tifm_sd_end_cmd(void *data) | |||
501 | struct tifm_dev *sock = host->dev; | 501 | struct tifm_dev *sock = host->dev; |
502 | struct mmc_host *mmc = tifm_get_drvdata(sock); | 502 | struct mmc_host *mmc = tifm_get_drvdata(sock); |
503 | struct mmc_request *mrq; | 503 | struct mmc_request *mrq; |
504 | struct mmc_data *r_data = 0; | 504 | struct mmc_data *r_data = NULL; |
505 | unsigned long flags; | 505 | unsigned long flags; |
506 | 506 | ||
507 | spin_lock_irqsave(&sock->lock, flags); | 507 | spin_lock_irqsave(&sock->lock, flags); |
508 | 508 | ||
509 | mrq = host->req; | 509 | mrq = host->req; |
510 | host->req = 0; | 510 | host->req = NULL; |
511 | host->state = IDLE; | 511 | host->state = IDLE; |
512 | 512 | ||
513 | if (!mrq) { | 513 | if (!mrq) { |
@@ -546,7 +546,7 @@ static void tifm_sd_request_nodma(struct mmc_host *mmc, struct mmc_request *mrq) | |||
546 | struct tifm_dev *sock = host->dev; | 546 | struct tifm_dev *sock = host->dev; |
547 | unsigned long flags; | 547 | unsigned long flags; |
548 | struct mmc_data *r_data = mrq->cmd->data; | 548 | struct mmc_data *r_data = mrq->cmd->data; |
549 | char *t_buffer = 0; | 549 | char *t_buffer = NULL; |
550 | 550 | ||
551 | if (r_data) { | 551 | if (r_data) { |
552 | t_buffer = kmap(r_data->sg->page); | 552 | t_buffer = kmap(r_data->sg->page); |
@@ -613,13 +613,13 @@ static void tifm_sd_end_cmd_nodma(void *data) | |||
613 | struct tifm_dev *sock = host->dev; | 613 | struct tifm_dev *sock = host->dev; |
614 | struct mmc_host *mmc = tifm_get_drvdata(sock); | 614 | struct mmc_host *mmc = tifm_get_drvdata(sock); |
615 | struct mmc_request *mrq; | 615 | struct mmc_request *mrq; |
616 | struct mmc_data *r_data = 0; | 616 | struct mmc_data *r_data = NULL; |
617 | unsigned long flags; | 617 | unsigned long flags; |
618 | 618 | ||
619 | spin_lock_irqsave(&sock->lock, flags); | 619 | spin_lock_irqsave(&sock->lock, flags); |
620 | 620 | ||
621 | mrq = host->req; | 621 | mrq = host->req; |
622 | host->req = 0; | 622 | host->req = NULL; |
623 | host->state = IDLE; | 623 | host->state = IDLE; |
624 | 624 | ||
625 | if (!mrq) { | 625 | if (!mrq) { |
@@ -644,7 +644,7 @@ static void tifm_sd_end_cmd_nodma(void *data) | |||
644 | r_data->bytes_xfered += r_data->blksz - | 644 | r_data->bytes_xfered += r_data->blksz - |
645 | readl(sock->addr + SOCK_MMCSD_BLOCK_LEN) + 1; | 645 | readl(sock->addr + SOCK_MMCSD_BLOCK_LEN) + 1; |
646 | } | 646 | } |
647 | host->buffer = 0; | 647 | host->buffer = NULL; |
648 | host->buffer_pos = 0; | 648 | host->buffer_pos = 0; |
649 | host->buffer_size = 0; | 649 | host->buffer_size = 0; |
650 | } | 650 | } |
@@ -895,7 +895,7 @@ static void tifm_sd_remove(struct tifm_dev *sock) | |||
895 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); | 895 | sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR); |
896 | writel(0, sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); | 896 | writel(0, sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET); |
897 | 897 | ||
898 | tifm_set_drvdata(sock, 0); | 898 | tifm_set_drvdata(sock, NULL); |
899 | mmc_free_host(mmc); | 899 | mmc_free_host(mmc); |
900 | } | 900 | } |
901 | 901 | ||
diff --git a/drivers/net/3c509.c b/drivers/net/3c509.c index 7ad0a54779c..f791bf026e5 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 1c97271112d..91849469b4f 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 d516c3225ca..f4aca5386ad 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 fa3442cb1a4..3d1c599ac3c 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 062f80e2087..2d306fcb7f3 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 d9b006c9e36..690bb40b353 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 e179aa1c1ba..00e2a8a134d 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 6b1234b09fb..a79520295fd 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 aae454aaa1c..a4eb0dc99ec 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 05ca730fe81..e14be020e56 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 971e2dee1e6..cebf8c374bc 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 7a9128181e6..636d0630fe0 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 6ea78ececca..654a68b490a 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 4393168347e..3f46b84c6c8 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 ea12e999814..29b5ccd29d0 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 b4fb92a7baa..4212657fa4f 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 7afac47e59a..6efbd499d75 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 e5f36691091..5ddd5742f77 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 c73e2f21077..36f9d988278 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 c0b333d2917..71afb274498 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 c9efad8a917..b269513cde4 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 dc30dee5537..b9fa4fbb139 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 06ea2626c6f..9733a11c614 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 cfece9676af..ed7aa0a5acc 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 45d07faf7b9..9d7cd130c19 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 9207e19cac3..5b00d79b557 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 020e7817059..7874eb1ef04 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 9bd4cba8787..46dabdb1207 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 c0ab6e44eb1..ea797ca2b98 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 e17f9779ead..3f4b6408b75 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 12363e056b6..6e5f1c89851 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 5715d25271f..6a485f0556f 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 793da5f6934..b779c7dcc1a 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 cadfe132db8..aafb301041b 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 a1430352169..5b98a787698 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 ac600212d9a..2412ce4917f 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 2068a109a86..b24b0727108 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 991e084db2d..7f5df9a9f39 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 db3c26b5de1..caca0dc9d30 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 3896278594c..d4613815f68 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 e04c2bc1932..a0d1cee0be7 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 7f0adf9c4c7..bcd7fffab90 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 81e3ee51d89..23f5e418ab5 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 1a7de3bd796..e0725353c99 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 0f0ac925d31..d03aa6ce8fe 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 107f0fc3494..56906aba5ee 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 4e56ec80386..634ecca36a7 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 8fa31e68989..8be8da37f62 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 039c2fd6d49..4f80c5b4a75 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 e92d7e1c22c..062bad457b1 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 846089f222d..415fe9633a9 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 3d91b6b9287..cd6b65333b7 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 77122edeb20..72025df5561 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) { |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 2306d493e55..021be39fe16 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -1087,7 +1087,7 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp) | |||
1087 | mos7840_port->icount.tx = 0; | 1087 | mos7840_port->icount.tx = 0; |
1088 | mos7840_port->icount.rx = 0; | 1088 | mos7840_port->icount.rx = 0; |
1089 | 1089 | ||
1090 | dbg("\n\nusb_serial serial:%x mos7840_port:%x\n usb_serial_port port:%x\n\n", (unsigned int)serial, (unsigned int)mos7840_port, (unsigned int)port); | 1090 | dbg("\n\nusb_serial serial:%p mos7840_port:%p\n usb_serial_port port:%p\n\n", serial, mos7840_port, port); |
1091 | 1091 | ||
1092 | return 0; | 1092 | return 0; |
1093 | 1093 | ||
@@ -1420,7 +1420,6 @@ static int mos7840_write(struct usb_serial_port *port, | |||
1420 | int i; | 1420 | int i; |
1421 | int bytes_sent = 0; | 1421 | int bytes_sent = 0; |
1422 | int transfer_size; | 1422 | int transfer_size; |
1423 | int from_user = 0; | ||
1424 | 1423 | ||
1425 | struct moschip_port *mos7840_port; | 1424 | struct moschip_port *mos7840_port; |
1426 | struct usb_serial *serial; | 1425 | struct usb_serial *serial; |
@@ -1511,15 +1510,7 @@ static int mos7840_write(struct usb_serial_port *port, | |||
1511 | } | 1510 | } |
1512 | transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE); | 1511 | transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE); |
1513 | 1512 | ||
1514 | if (from_user) { | 1513 | memcpy(urb->transfer_buffer, current_position, transfer_size); |
1515 | if (copy_from_user | ||
1516 | (urb->transfer_buffer, current_position, transfer_size)) { | ||
1517 | bytes_sent = -EFAULT; | ||
1518 | goto exit; | ||
1519 | } | ||
1520 | } else { | ||
1521 | memcpy(urb->transfer_buffer, current_position, transfer_size); | ||
1522 | } | ||
1523 | 1514 | ||
1524 | /* fill urb with data and submit */ | 1515 | /* fill urb with data and submit */ |
1525 | usb_fill_bulk_urb(urb, | 1516 | usb_fill_bulk_urb(urb, |
@@ -2225,7 +2216,7 @@ static void mos7840_set_termios(struct usb_serial_port *port, | |||
2225 | *****************************************************************************/ | 2216 | *****************************************************************************/ |
2226 | 2217 | ||
2227 | static int mos7840_get_lsr_info(struct moschip_port *mos7840_port, | 2218 | static int mos7840_get_lsr_info(struct moschip_port *mos7840_port, |
2228 | unsigned int *value) | 2219 | unsigned int __user *value) |
2229 | { | 2220 | { |
2230 | int count; | 2221 | int count; |
2231 | unsigned int result = 0; | 2222 | unsigned int result = 0; |
@@ -2248,7 +2239,7 @@ static int mos7840_get_lsr_info(struct moschip_port *mos7840_port, | |||
2248 | *****************************************************************************/ | 2239 | *****************************************************************************/ |
2249 | 2240 | ||
2250 | static int mos7840_get_bytes_avail(struct moschip_port *mos7840_port, | 2241 | static int mos7840_get_bytes_avail(struct moschip_port *mos7840_port, |
2251 | unsigned int *value) | 2242 | unsigned int __user *value) |
2252 | { | 2243 | { |
2253 | unsigned int result = 0; | 2244 | unsigned int result = 0; |
2254 | struct tty_struct *tty = mos7840_port->port->tty; | 2245 | struct tty_struct *tty = mos7840_port->port->tty; |
@@ -2271,7 +2262,7 @@ static int mos7840_get_bytes_avail(struct moschip_port *mos7840_port, | |||
2271 | *****************************************************************************/ | 2262 | *****************************************************************************/ |
2272 | 2263 | ||
2273 | static int mos7840_set_modem_info(struct moschip_port *mos7840_port, | 2264 | static int mos7840_set_modem_info(struct moschip_port *mos7840_port, |
2274 | unsigned int cmd, unsigned int *value) | 2265 | unsigned int cmd, unsigned int __user *value) |
2275 | { | 2266 | { |
2276 | unsigned int mcr; | 2267 | unsigned int mcr; |
2277 | unsigned int arg; | 2268 | unsigned int arg; |
@@ -2341,7 +2332,7 @@ static int mos7840_set_modem_info(struct moschip_port *mos7840_port, | |||
2341 | *****************************************************************************/ | 2332 | *****************************************************************************/ |
2342 | 2333 | ||
2343 | static int mos7840_get_modem_info(struct moschip_port *mos7840_port, | 2334 | static int mos7840_get_modem_info(struct moschip_port *mos7840_port, |
2344 | unsigned int *value) | 2335 | unsigned int __user *value) |
2345 | { | 2336 | { |
2346 | unsigned int result = 0; | 2337 | unsigned int result = 0; |
2347 | __u16 msr; | 2338 | __u16 msr; |
@@ -2370,7 +2361,7 @@ static int mos7840_get_modem_info(struct moschip_port *mos7840_port, | |||
2370 | *****************************************************************************/ | 2361 | *****************************************************************************/ |
2371 | 2362 | ||
2372 | static int mos7840_get_serial_info(struct moschip_port *mos7840_port, | 2363 | static int mos7840_get_serial_info(struct moschip_port *mos7840_port, |
2373 | struct serial_struct *retinfo) | 2364 | struct serial_struct __user *retinfo) |
2374 | { | 2365 | { |
2375 | struct serial_struct tmp; | 2366 | struct serial_struct tmp; |
2376 | 2367 | ||
@@ -2405,6 +2396,7 @@ static int mos7840_get_serial_info(struct moschip_port *mos7840_port, | |||
2405 | static int mos7840_ioctl(struct usb_serial_port *port, struct file *file, | 2396 | static int mos7840_ioctl(struct usb_serial_port *port, struct file *file, |
2406 | unsigned int cmd, unsigned long arg) | 2397 | unsigned int cmd, unsigned long arg) |
2407 | { | 2398 | { |
2399 | void __user *argp = (void __user *)arg; | ||
2408 | struct moschip_port *mos7840_port; | 2400 | struct moschip_port *mos7840_port; |
2409 | struct tty_struct *tty; | 2401 | struct tty_struct *tty; |
2410 | 2402 | ||
@@ -2433,16 +2425,13 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file, | |||
2433 | 2425 | ||
2434 | case TIOCINQ: | 2426 | case TIOCINQ: |
2435 | dbg("%s (%d) TIOCINQ", __FUNCTION__, port->number); | 2427 | dbg("%s (%d) TIOCINQ", __FUNCTION__, port->number); |
2436 | return mos7840_get_bytes_avail(mos7840_port, | 2428 | return mos7840_get_bytes_avail(mos7840_port, argp); |
2437 | (unsigned int *)arg); | ||
2438 | break; | ||
2439 | 2429 | ||
2440 | case TIOCOUTQ: | 2430 | case TIOCOUTQ: |
2441 | dbg("%s (%d) TIOCOUTQ", __FUNCTION__, port->number); | 2431 | dbg("%s (%d) TIOCOUTQ", __FUNCTION__, port->number); |
2442 | return put_user(tty->driver->chars_in_buffer ? | 2432 | return put_user(tty->driver->chars_in_buffer ? |
2443 | tty->driver->chars_in_buffer(tty) : 0, | 2433 | tty->driver->chars_in_buffer(tty) : 0, |
2444 | (int __user *)arg); | 2434 | (int __user *)arg); |
2445 | break; | ||
2446 | 2435 | ||
2447 | case TCFLSH: | 2436 | case TCFLSH: |
2448 | retval = tty_check_change(tty); | 2437 | retval = tty_check_change(tty); |
@@ -2472,13 +2461,13 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file, | |||
2472 | 2461 | ||
2473 | case TCGETS: | 2462 | case TCGETS: |
2474 | if (kernel_termios_to_user_termios | 2463 | if (kernel_termios_to_user_termios |
2475 | ((struct termios __user *)arg, tty->termios)) | 2464 | ((struct termios __user *)argp, tty->termios)) |
2476 | return -EFAULT; | 2465 | return -EFAULT; |
2477 | return 0; | 2466 | return 0; |
2478 | 2467 | ||
2479 | case TIOCSERGETLSR: | 2468 | case TIOCSERGETLSR: |
2480 | dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number); | 2469 | dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number); |
2481 | return mos7840_get_lsr_info(mos7840_port, (unsigned int *)arg); | 2470 | return mos7840_get_lsr_info(mos7840_port, argp); |
2482 | return 0; | 2471 | return 0; |
2483 | 2472 | ||
2484 | case TIOCMBIS: | 2473 | case TIOCMBIS: |
@@ -2487,19 +2476,16 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file, | |||
2487 | dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, | 2476 | dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, |
2488 | port->number); | 2477 | port->number); |
2489 | mosret = | 2478 | mosret = |
2490 | mos7840_set_modem_info(mos7840_port, cmd, | 2479 | mos7840_set_modem_info(mos7840_port, cmd, argp); |
2491 | (unsigned int *)arg); | ||
2492 | return mosret; | 2480 | return mosret; |
2493 | 2481 | ||
2494 | case TIOCMGET: | 2482 | case TIOCMGET: |
2495 | dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number); | 2483 | dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number); |
2496 | return mos7840_get_modem_info(mos7840_port, | 2484 | return mos7840_get_modem_info(mos7840_port, argp); |
2497 | (unsigned int *)arg); | ||
2498 | 2485 | ||
2499 | case TIOCGSERIAL: | 2486 | case TIOCGSERIAL: |
2500 | dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number); | 2487 | dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number); |
2501 | return mos7840_get_serial_info(mos7840_port, | 2488 | return mos7840_get_serial_info(mos7840_port, argp); |
2502 | (struct serial_struct *)arg); | ||
2503 | 2489 | ||
2504 | case TIOCSSERIAL: | 2490 | case TIOCSSERIAL: |
2505 | dbg("%s (%d) TIOCSSERIAL", __FUNCTION__, port->number); | 2491 | dbg("%s (%d) TIOCSSERIAL", __FUNCTION__, port->number); |
@@ -2549,7 +2535,7 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file, | |||
2549 | 2535 | ||
2550 | dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, | 2536 | dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__, |
2551 | port->number, icount.rx, icount.tx); | 2537 | port->number, icount.rx, icount.tx); |
2552 | if (copy_to_user((void *)arg, &icount, sizeof(icount))) | 2538 | if (copy_to_user(argp, &icount, sizeof(icount))) |
2553 | return -EFAULT; | 2539 | return -EFAULT; |
2554 | return 0; | 2540 | return 0; |
2555 | 2541 | ||
@@ -2817,7 +2803,7 @@ static int mos7840_startup(struct usb_serial *serial) | |||
2817 | 2803 | ||
2818 | /* setting configuration feature to one */ | 2804 | /* setting configuration feature to one */ |
2819 | usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), | 2805 | usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0), |
2820 | (__u8) 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 5 * HZ); | 2806 | (__u8) 0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5 * HZ); |
2821 | return 0; | 2807 | return 0; |
2822 | } | 2808 | } |
2823 | 2809 | ||
diff --git a/fs/dlm/lowcomms.c b/fs/dlm/lowcomms.c index 23f5ce12080..7bcea7c5add 100644 --- a/fs/dlm/lowcomms.c +++ b/fs/dlm/lowcomms.c | |||
@@ -174,7 +174,7 @@ static int nodeid_to_addr(int nodeid, struct sockaddr *retaddr) | |||
174 | return 0; | 174 | return 0; |
175 | } | 175 | } |
176 | 176 | ||
177 | static struct nodeinfo *nodeid2nodeinfo(int nodeid, int alloc) | 177 | static struct nodeinfo *nodeid2nodeinfo(int nodeid, gfp_t alloc) |
178 | { | 178 | { |
179 | struct nodeinfo *ni; | 179 | struct nodeinfo *ni; |
180 | int r; | 180 | int r; |
@@ -726,7 +726,7 @@ static int init_sock(void) | |||
726 | } | 726 | } |
727 | 727 | ||
728 | 728 | ||
729 | static struct writequeue_entry *new_writequeue_entry(int allocation) | 729 | static struct writequeue_entry *new_writequeue_entry(gfp_t allocation) |
730 | { | 730 | { |
731 | struct writequeue_entry *entry; | 731 | struct writequeue_entry *entry; |
732 | 732 | ||
@@ -748,7 +748,7 @@ static struct writequeue_entry *new_writequeue_entry(int allocation) | |||
748 | return entry; | 748 | return entry; |
749 | } | 749 | } |
750 | 750 | ||
751 | void *dlm_lowcomms_get_buffer(int nodeid, int len, int allocation, char **ppc) | 751 | void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc) |
752 | { | 752 | { |
753 | struct writequeue_entry *e; | 753 | struct writequeue_entry *e; |
754 | int offset = 0; | 754 | int offset = 0; |
diff --git a/fs/dlm/lowcomms.h b/fs/dlm/lowcomms.h index 6c04bb09cfa..2d045e0daae 100644 --- a/fs/dlm/lowcomms.h +++ b/fs/dlm/lowcomms.h | |||
@@ -19,7 +19,7 @@ void dlm_lowcomms_exit(void); | |||
19 | int dlm_lowcomms_start(void); | 19 | int dlm_lowcomms_start(void); |
20 | void dlm_lowcomms_stop(void); | 20 | void dlm_lowcomms_stop(void); |
21 | int dlm_lowcomms_close(int nodeid); | 21 | int dlm_lowcomms_close(int nodeid); |
22 | void *dlm_lowcomms_get_buffer(int nodeid, int len, int allocation, char **ppc); | 22 | void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc); |
23 | void dlm_lowcomms_commit_buffer(void *mh); | 23 | void dlm_lowcomms_commit_buffer(void *mh); |
24 | 24 | ||
25 | #endif /* __LOWCOMMS_DOT_H__ */ | 25 | #endif /* __LOWCOMMS_DOT_H__ */ |
diff --git a/fs/hppfs/hppfs_kern.c b/fs/hppfs/hppfs_kern.c index dcb6d2e988b..642675fc394 100644 --- a/fs/hppfs/hppfs_kern.c +++ b/fs/hppfs/hppfs_kern.c | |||
@@ -572,7 +572,7 @@ struct hppfs_dirent { | |||
572 | }; | 572 | }; |
573 | 573 | ||
574 | static int hppfs_filldir(void *d, const char *name, int size, | 574 | static int hppfs_filldir(void *d, const char *name, int size, |
575 | loff_t offset, ino_t inode, unsigned int type) | 575 | loff_t offset, u64 inode, unsigned int type) |
576 | { | 576 | { |
577 | struct hppfs_dirent *dirent = d; | 577 | struct hppfs_dirent *dirent = d; |
578 | 578 | ||
diff --git a/fs/ncpfs/ioctl.c b/fs/ncpfs/ioctl.c index a89ac84a824..589d1eac55c 100644 --- a/fs/ncpfs/ioctl.c +++ b/fs/ncpfs/ioctl.c | |||
@@ -726,7 +726,7 @@ outrel: | |||
726 | struct compat_ncp_privatedata_ioctl user32; | 726 | struct compat_ncp_privatedata_ioctl user32; |
727 | user32.len = user.len; | 727 | user32.len = user.len; |
728 | user32.data = (unsigned long) user.data; | 728 | user32.data = (unsigned long) user.data; |
729 | if (copy_to_user(&user32, argp, sizeof(user32))) | 729 | if (copy_to_user(argp, &user32, sizeof(user32))) |
730 | return -EFAULT; | 730 | return -EFAULT; |
731 | } else | 731 | } else |
732 | #endif | 732 | #endif |
diff --git a/fs/xattr.c b/fs/xattr.c index c32f15b5f60..395635100f7 100644 --- a/fs/xattr.c +++ b/fs/xattr.c | |||
@@ -135,6 +135,26 @@ vfs_getxattr(struct dentry *dentry, char *name, void *value, size_t size) | |||
135 | } | 135 | } |
136 | EXPORT_SYMBOL_GPL(vfs_getxattr); | 136 | EXPORT_SYMBOL_GPL(vfs_getxattr); |
137 | 137 | ||
138 | ssize_t | ||
139 | vfs_listxattr(struct dentry *d, char *list, size_t size) | ||
140 | { | ||
141 | ssize_t error; | ||
142 | |||
143 | error = security_inode_listxattr(d); | ||
144 | if (error) | ||
145 | return error; | ||
146 | error = -EOPNOTSUPP; | ||
147 | if (d->d_inode->i_op && d->d_inode->i_op->listxattr) { | ||
148 | error = d->d_inode->i_op->listxattr(d, list, size); | ||
149 | } else { | ||
150 | error = security_inode_listsecurity(d->d_inode, list, size); | ||
151 | if (size && error > size) | ||
152 | error = -ERANGE; | ||
153 | } | ||
154 | return error; | ||
155 | } | ||
156 | EXPORT_SYMBOL_GPL(vfs_listxattr); | ||
157 | |||
138 | int | 158 | int |
139 | vfs_removexattr(struct dentry *dentry, char *name) | 159 | vfs_removexattr(struct dentry *dentry, char *name) |
140 | { | 160 | { |
@@ -346,17 +366,7 @@ listxattr(struct dentry *d, char __user *list, size_t size) | |||
346 | return -ENOMEM; | 366 | return -ENOMEM; |
347 | } | 367 | } |
348 | 368 | ||
349 | error = security_inode_listxattr(d); | 369 | error = vfs_listxattr(d, klist, size); |
350 | if (error) | ||
351 | goto out; | ||
352 | error = -EOPNOTSUPP; | ||
353 | if (d->d_inode->i_op && d->d_inode->i_op->listxattr) { | ||
354 | error = d->d_inode->i_op->listxattr(d, klist, size); | ||
355 | } else { | ||
356 | error = security_inode_listsecurity(d->d_inode, klist, size); | ||
357 | if (size && error > size) | ||
358 | error = -ERANGE; | ||
359 | } | ||
360 | if (error > 0) { | 370 | if (error > 0) { |
361 | if (size && copy_to_user(list, klist, error)) | 371 | if (size && copy_to_user(list, klist, error)) |
362 | error = -EFAULT; | 372 | error = -EFAULT; |
@@ -365,7 +375,6 @@ listxattr(struct dentry *d, char __user *list, size_t size) | |||
365 | than XATTR_LIST_MAX bytes. Not possible. */ | 375 | than XATTR_LIST_MAX bytes. Not possible. */ |
366 | error = -E2BIG; | 376 | error = -E2BIG; |
367 | } | 377 | } |
368 | out: | ||
369 | kfree(klist); | 378 | kfree(klist); |
370 | return error; | 379 | return error; |
371 | } | 380 | } |
diff --git a/include/linux/xattr.h b/include/linux/xattr.h index cda8a96e2fa..0e7f1e20ea4 100644 --- a/include/linux/xattr.h +++ b/include/linux/xattr.h | |||
@@ -41,6 +41,7 @@ struct xattr_handler { | |||
41 | }; | 41 | }; |
42 | 42 | ||
43 | ssize_t vfs_getxattr(struct dentry *, char *, void *, size_t); | 43 | ssize_t vfs_getxattr(struct dentry *, char *, void *, size_t); |
44 | ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size); | ||
44 | int vfs_setxattr(struct dentry *, char *, void *, size_t, int); | 45 | int vfs_setxattr(struct dentry *, char *, void *, size_t, int); |
45 | int vfs_removexattr(struct dentry *, char *); | 46 | int vfs_removexattr(struct dentry *, char *); |
46 | 47 | ||
diff --git a/sound/isa/gus/gusmax.c b/sound/isa/gus/gusmax.c index 52498c9d411..c1c69e3cbfd 100644 --- a/sound/isa/gus/gusmax.c +++ b/sound/isa/gus/gusmax.c | |||
@@ -107,7 +107,7 @@ static int __init snd_gusmax_detect(struct snd_gus_card * gus) | |||
107 | 107 | ||
108 | static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id) | 108 | static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id) |
109 | { | 109 | { |
110 | struct snd_gusmax *maxcard = (struct snd_gusmax *) dev_id; | 110 | struct snd_gusmax *maxcard = dev_id; |
111 | int loop, max = 5; | 111 | int loop, max = 5; |
112 | int handled = 0; | 112 | int handled = 0; |
113 | 113 | ||
diff --git a/sound/isa/gus/interwave.c b/sound/isa/gus/interwave.c index 5c474b831ed..f12cd09d1fc 100644 --- a/sound/isa/gus/interwave.c +++ b/sound/isa/gus/interwave.c | |||
@@ -301,7 +301,7 @@ static int __devinit snd_interwave_detect(struct snd_interwave *iwcard, | |||
301 | 301 | ||
302 | static irqreturn_t snd_interwave_interrupt(int irq, void *dev_id) | 302 | static irqreturn_t snd_interwave_interrupt(int irq, void *dev_id) |
303 | { | 303 | { |
304 | struct snd_interwave *iwcard = (struct snd_interwave *) dev_id; | 304 | struct snd_interwave *iwcard = dev_id; |
305 | int loop, max = 5; | 305 | int loop, max = 5; |
306 | int handled = 0; | 306 | int handled = 0; |
307 | 307 | ||
diff --git a/sound/oss/es1371.c b/sound/oss/es1371.c index 2562f4769b9..ddf6b0a0bca 100644 --- a/sound/oss/es1371.c +++ b/sound/oss/es1371.c | |||
@@ -1102,7 +1102,7 @@ static void es1371_handle_midi(struct es1371_state *s) | |||
1102 | 1102 | ||
1103 | static irqreturn_t es1371_interrupt(int irq, void *dev_id) | 1103 | static irqreturn_t es1371_interrupt(int irq, void *dev_id) |
1104 | { | 1104 | { |
1105 | struct es1371_state *s = (struct es1371_state *)dev_id; | 1105 | struct es1371_state *s = dev_id; |
1106 | unsigned int intsrc, sctl; | 1106 | unsigned int intsrc, sctl; |
1107 | 1107 | ||
1108 | /* fastpath out, to ease interrupt sharing */ | 1108 | /* fastpath out, to ease interrupt sharing */ |
diff --git a/sound/oss/hal2.c b/sound/oss/hal2.c index 7807abac062..784bdd70705 100644 --- a/sound/oss/hal2.c +++ b/sound/oss/hal2.c | |||
@@ -372,7 +372,7 @@ static void hal2_adc_interrupt(struct hal2_codec *adc) | |||
372 | 372 | ||
373 | static irqreturn_t hal2_interrupt(int irq, void *dev_id) | 373 | static irqreturn_t hal2_interrupt(int irq, void *dev_id) |
374 | { | 374 | { |
375 | struct hal2_card *hal2 = (struct hal2_card*)dev_id; | 375 | struct hal2_card *hal2 = dev_id; |
376 | irqreturn_t ret = IRQ_NONE; | 376 | irqreturn_t ret = IRQ_NONE; |
377 | 377 | ||
378 | /* decide what caused this interrupt */ | 378 | /* decide what caused this interrupt */ |
diff --git a/sound/oss/i810_audio.c b/sound/oss/i810_audio.c index a48af879b46..240cc7939b6 100644 --- a/sound/oss/i810_audio.c +++ b/sound/oss/i810_audio.c | |||
@@ -1525,7 +1525,7 @@ static void i810_channel_interrupt(struct i810_card *card) | |||
1525 | 1525 | ||
1526 | static irqreturn_t i810_interrupt(int irq, void *dev_id) | 1526 | static irqreturn_t i810_interrupt(int irq, void *dev_id) |
1527 | { | 1527 | { |
1528 | struct i810_card *card = (struct i810_card *)dev_id; | 1528 | struct i810_card *card = dev_id; |
1529 | u32 status; | 1529 | u32 status; |
1530 | 1530 | ||
1531 | spin_lock(&card->lock); | 1531 | spin_lock(&card->lock); |
diff --git a/sound/oss/mpu401.c b/sound/oss/mpu401.c index 58d4a5d05a2..e9622054197 100644 --- a/sound/oss/mpu401.c +++ b/sound/oss/mpu401.c | |||
@@ -435,7 +435,7 @@ static void mpu401_input_loop(struct mpu_config *devc) | |||
435 | static irqreturn_t mpuintr(int irq, void *dev_id) | 435 | static irqreturn_t mpuintr(int irq, void *dev_id) |
436 | { | 436 | { |
437 | struct mpu_config *devc; | 437 | struct mpu_config *devc; |
438 | int dev = (int) dev_id; | 438 | int dev = (int)(unsigned long) dev_id; |
439 | int handled = 0; | 439 | int handled = 0; |
440 | 440 | ||
441 | devc = &dev_conf[dev]; | 441 | devc = &dev_conf[dev]; |
diff --git a/sound/oss/vwsnd.c b/sound/oss/vwsnd.c index 0cd4d6ec986..6dfb9f4b03e 100644 --- a/sound/oss/vwsnd.c +++ b/sound/oss/vwsnd.c | |||
@@ -2235,7 +2235,7 @@ static void vwsnd_audio_write_intr(vwsnd_dev_t *devc, unsigned int status) | |||
2235 | 2235 | ||
2236 | static irqreturn_t vwsnd_audio_intr(int irq, void *dev_id) | 2236 | static irqreturn_t vwsnd_audio_intr(int irq, void *dev_id) |
2237 | { | 2237 | { |
2238 | vwsnd_dev_t *devc = (vwsnd_dev_t *) dev_id; | 2238 | vwsnd_dev_t *devc = dev_id; |
2239 | unsigned int status; | 2239 | unsigned int status; |
2240 | 2240 | ||
2241 | DBGEV("(irq=%d, dev_id=0x%p)\n", irq, dev_id); | 2241 | DBGEV("(irq=%d, dev_id=0x%p)\n", irq, dev_id); |
diff --git a/sound/pci/korg1212/korg1212.c b/sound/pci/korg1212/korg1212.c index 398aa10a06e..fa8cd8cecc2 100644 --- a/sound/pci/korg1212/korg1212.c +++ b/sound/pci/korg1212/korg1212.c | |||
@@ -1124,9 +1124,6 @@ static irqreturn_t snd_korg1212_interrupt(int irq, void *dev_id) | |||
1124 | u32 doorbellValue; | 1124 | u32 doorbellValue; |
1125 | struct snd_korg1212 *korg1212 = dev_id; | 1125 | struct snd_korg1212 *korg1212 = dev_id; |
1126 | 1126 | ||
1127 | if(irq != korg1212->irq) | ||
1128 | return IRQ_NONE; | ||
1129 | |||
1130 | doorbellValue = readl(korg1212->inDoorbellPtr); | 1127 | doorbellValue = readl(korg1212->inDoorbellPtr); |
1131 | 1128 | ||
1132 | if (!doorbellValue) | 1129 | if (!doorbellValue) |
@@ -1140,7 +1137,6 @@ static irqreturn_t snd_korg1212_interrupt(int irq, void *dev_id) | |||
1140 | 1137 | ||
1141 | korg1212->inIRQ++; | 1138 | korg1212->inIRQ++; |
1142 | 1139 | ||
1143 | |||
1144 | switch (doorbellValue) { | 1140 | switch (doorbellValue) { |
1145 | case K1212_DB_DSPDownloadDone: | 1141 | case K1212_DB_DSPDownloadDone: |
1146 | K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ DNLD count - %ld, %x, [%s].\n", | 1142 | K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ DNLD count - %ld, %x, [%s].\n", |