Merge git://git.infradead.org/~dhowells/irq-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Oct 2006 21:29:26 +0000 (14:29 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 9 Oct 2006 21:29:26 +0000 (14:29 -0700)
* git://git.infradead.org/~dhowells/irq-2.6:
  IRQ: Use the new typedef for interrupt handler function pointers

94 files changed:
arch/alpha/kernel/proto.h
arch/alpha/kernel/sys_titan.c
arch/i386/kernel/time.c
arch/ia64/sn/kernel/huberror.c
arch/ia64/sn/pci/pcibr/pcibr_provider.c
arch/powerpc/kernel/irq.c
arch/powerpc/platforms/pasemi/pci.c
arch/ppc/syslib/mv64360_pic.c
arch/s390/kernel/traps.c
arch/sparc64/kernel/irq.c
arch/sparc64/kernel/time.c
drivers/atm/ambassador.c
drivers/atm/horizon.c
drivers/atm/lanai.c
drivers/block/DAC960.c
drivers/cdrom/mcdx.c
drivers/char/rio/func.h
drivers/char/rio/rio_linux.c
drivers/char/rio/riointr.c
drivers/char/riscom8.c
drivers/char/specialix.c
drivers/isdn/act2000/act2000_isa.c
drivers/media/video/zoran_device.c
drivers/misc/tifm_7xx1.c
drivers/misc/tifm_core.c
drivers/mmc/tifm_sd.c
drivers/net/3c509.c
drivers/net/3c523.c
drivers/net/3c527.c
drivers/net/8390.c
drivers/net/atp.c
drivers/net/de600.c
drivers/net/declance.c
drivers/net/dgrs.c
drivers/net/eepro.c
drivers/net/eexpress.c
drivers/net/irda/ali-ircc.c
drivers/net/irda/donauboe.c
drivers/net/irda/irport.c
drivers/net/irda/irport.h
drivers/net/irda/nsc-ircc.c
drivers/net/irda/w83977af_ir.c
drivers/net/lance.c
drivers/net/pcmcia/axnet_cs.c
drivers/net/pcnet32.c
drivers/net/plip.c
drivers/net/saa9730.c
drivers/net/sb1000.c
drivers/net/skfp/skfddi.c
drivers/net/sonic.c
drivers/net/sunhme.c
drivers/net/sunlance.c
drivers/net/sunqe.c
drivers/net/tokenring/smctr.c
drivers/net/tokenring/tms380tr.c
drivers/net/tulip/de4x5.c
drivers/net/wan/cycx_main.c
drivers/net/wan/sdla.c
drivers/net/wireless/orinoco.c
drivers/net/wireless/wavelan_cs.c
drivers/net/wireless/wl3501_cs.c
drivers/net/yellowfin.c
drivers/net/znet.c
drivers/pcmcia/at91_cf.c
drivers/pcmcia/hd64465_ss.c
drivers/scsi/NCR53c406a.c
drivers/scsi/aha152x.c
drivers/scsi/aic7xxx_old.c
drivers/scsi/dc395x.c
drivers/scsi/qlogicfas408.c
drivers/scsi/tmscsim.c
drivers/scsi/ultrastor.c
drivers/serial/68360serial.c
drivers/serial/jsm/jsm_neo.c
drivers/serial/mpc52xx_uart.c
drivers/serial/netx-serial.c
drivers/serial/pxa.c
drivers/sn/ioc3.c
drivers/spi/pxa2xx_spi.c
drivers/usb/serial/mos7840.c
fs/dlm/lowcomms.c
fs/dlm/lowcomms.h
fs/hppfs/hppfs_kern.c
fs/ncpfs/ioctl.c
fs/xattr.c
include/linux/xattr.h
sound/isa/gus/gusmax.c
sound/isa/gus/interwave.c
sound/oss/es1371.c
sound/oss/hal2.c
sound/oss/i810_audio.c
sound/oss/mpu401.c
sound/oss/vwsnd.c
sound/pci/korg1212/korg1212.c

index daccd4b..95912ec 100644 (file)
@@ -36,7 +36,7 @@ extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
 extern struct pci_ops irongate_pci_ops;
 extern int irongate_pci_clr_err(void);
 extern void irongate_init_arch(void);
-extern void irongate_machine_check(u64, u64, struct pt_regs *);
+extern void irongate_machine_check(u64, u64);
 #define irongate_pci_tbi ((void *)0)
 
 /* core_lca.c */
index 161d691..29ab7db 100644 (file)
@@ -204,7 +204,7 @@ static struct hw_interrupt_type titan_irq_type = {
 };
 
 static irqreturn_t
-titan_intr_nop(int irq, void *dev_id, struct pt_regs *regs)                    
+titan_intr_nop(int irq, void *dev_id)
 {
       /*
        * This is a NOP interrupt handler for the purposes of
index 3f221f5..78af572 100644 (file)
@@ -201,8 +201,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id)
                high bit of the PPI port B (0x61).  Note that some PS/2s,
                notably the 55SX, work fine if this is removed.  */
 
-               irq = inb_p( 0x61 );    /* read the current state */
-               outb_p( irq|0x80, 0x61 );       /* reset the IRQ */
+               u8 irq_v = inb_p( 0x61 );       /* read the current state */
+               outb_p( irq_v|0x80, 0x61 );     /* reset the IRQ */
        }
 
        write_sequnlock(&xtime_lock);
index 96fb81e..abca6bd 100644 (file)
@@ -22,7 +22,7 @@
 void hubiio_crb_error_handler(struct hubdev_info *hubdev_info);
 extern void bte_crb_error_handler(cnodeid_t, int, int, ioerror_t *,
                                  int);
-static irqreturn_t hub_eint_handler(int irq, void *arg, struct pt_regs *ep)
+static irqreturn_t hub_eint_handler(int irq, void *arg)
 {
        struct hubdev_info *hubdev_info;
        struct ia64_sal_retval ret_stuff;
@@ -178,7 +178,7 @@ void hubiio_crb_error_handler(struct hubdev_info *hubdev_info)
  */
 void hub_error_init(struct hubdev_info *hubdev_info)
 {
-       if (request_irq(SGI_II_ERROR, (void *)hub_eint_handler, IRQF_SHARED,
+       if (request_irq(SGI_II_ERROR, hub_eint_handler, IRQF_SHARED,
                        "SN_hub_error", (void *)hubdev_info))
                printk("hub_error_init: Failed to request_irq for 0x%p\n",
                    hubdev_info);
index 838c93c..27dd7df 100644 (file)
@@ -95,7 +95,7 @@ u16 sn_ioboard_to_pci_bus(struct pci_bus *pci_bus)
  * bridge sends an error interrupt.
  */
 static irqreturn_t
-pcibr_error_intr_handler(int irq, void *arg, struct pt_regs *regs)
+pcibr_error_intr_handler(int irq, void *arg)
 {
        struct pcibus_info *soft = (struct pcibus_info *)arg;
 
@@ -138,7 +138,7 @@ pcibr_bus_fixup(struct pcibus_bussoft *prom_bussoft, struct pci_controller *cont
        /*
         * register the bridge's error interrupt handler
         */
-       if (request_irq(SGI_PCIASIC_ERROR, (void *)pcibr_error_intr_handler,
+       if (request_irq(SGI_PCIASIC_ERROR, pcibr_error_intr_handler,
                        IRQF_SHARED, "PCIBR error", (void *)(soft))) {
                printk(KERN_WARNING
                       "pcibr cannot allocate interrupt for error handler\n");
index 829ac18..5e37bf1 100644 (file)
@@ -572,8 +572,8 @@ unsigned int irq_create_mapping(struct irq_host *host,
 }
 EXPORT_SYMBOL_GPL(irq_create_mapping);
 
-extern unsigned int irq_create_of_mapping(struct device_node *controller,
-                                         u32 *intspec, unsigned int intsize)
+unsigned int irq_create_of_mapping(struct device_node *controller,
+                                  u32 *intspec, unsigned int intsize)
 {
        struct irq_host *host;
        irq_hw_number_t hwirq;
index 4679c52..39020c1 100644 (file)
 
 #define CONFIG_OFFSET_VALID(off) ((off) < 4096)
 
-static unsigned long pa_pxp_cfg_addr(struct pci_controller *hose,
+static void volatile __iomem *pa_pxp_cfg_addr(struct pci_controller *hose,
                                       u8 bus, u8 devfn, int offset)
 {
-       return ((unsigned long)hose->cfg_data) + PA_PXP_CFA(bus, devfn, offset);
+       return hose->cfg_data + PA_PXP_CFA(bus, devfn, offset);
 }
 
 static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
                              int offset, int len, u32 *val)
 {
        struct pci_controller *hose;
-       unsigned long addr;
+       void volatile __iomem *addr;
 
        hose = pci_bus_to_host(bus);
        if (!hose)
@@ -62,13 +62,13 @@ static int pa_pxp_read_config(struct pci_bus *bus, unsigned int devfn,
         */
        switch (len) {
        case 1:
-               *val = in_8((u8 *)addr);
+               *val = in_8(addr);
                break;
        case 2:
-               *val = in_le16((u16 *)addr);
+               *val = in_le16(addr);
                break;
        default:
-               *val = in_le32((u32 *)addr);
+               *val = in_le32(addr);
                break;
        }
 
@@ -79,7 +79,7 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn,
                               int offset, int len, u32 val)
 {
        struct pci_controller *hose;
-       unsigned long addr;
+       void volatile __iomem *addr;
 
        hose = pci_bus_to_host(bus);
        if (!hose)
@@ -96,16 +96,16 @@ static int pa_pxp_write_config(struct pci_bus *bus, unsigned int devfn,
         */
        switch (len) {
        case 1:
-               out_8((u8 *)addr, val);
-               (void) in_8((u8 *)addr);
+               out_8(addr, val);
+               (void) in_8(addr);
                break;
        case 2:
-               out_le16((u16 *)addr, val);
-               (void) in_le16((u16 *)addr);
+               out_le16(addr, val);
+               (void) in_le16(addr);
                break;
        default:
-               out_le32((u32 *)addr, val);
-               (void) in_le32((u32 *)addr);
+               out_le32(addr, val);
+               (void) in_le32(addr);
                break;
        }
        return PCIBIOS_SUCCESSFUL;
index 3f6d162..5104386 100644 (file)
@@ -380,7 +380,7 @@ mv64360_register_hdlrs(void)
        /* Clear old errors and register CPU interface error intr handler */
        mv64x60_write(&bh, MV64x60_CPU_ERR_CAUSE, 0);
        if ((rc = request_irq(MV64x60_IRQ_CPU_ERR + mv64360_irq_base,
-               mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, 0)))
+               mv64360_cpu_error_int_handler, IRQF_DISABLED, CPU_INTR_STR, NULL)))
                printk(KERN_WARNING "Can't register cpu error handler: %d", rc);
 
        mv64x60_write(&bh, MV64x60_CPU_ERR_MASK, 0);
@@ -389,7 +389,7 @@ mv64360_register_hdlrs(void)
        /* Clear old errors and register internal SRAM error intr handler */
        mv64x60_write(&bh, MV64360_SRAM_ERR_CAUSE, 0);
        if ((rc = request_irq(MV64360_IRQ_SRAM_PAR_ERR + mv64360_irq_base,
-               mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, 0)))
+               mv64360_sram_error_int_handler,IRQF_DISABLED,SRAM_INTR_STR, NULL)))
                printk(KERN_WARNING "Can't register SRAM error handler: %d",rc);
 
        /* Clear old errors and register PCI 0 error intr handler */
index 05bf3cc..66375a5 100644 (file)
@@ -474,7 +474,7 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code)
                        signal = math_emu_b3(opcode, regs);
                 } else if (opcode[0] == 0xed) {
                        get_user(*((__u32 *) (opcode+2)),
-                                (__u32 *)(location+1));
+                                (__u32 __user *)(location+1));
                        signal = math_emu_ed(opcode, regs);
                } else if (*((__u16 *) opcode) == 0xb299) {
                        get_user(*((__u16 *) (opcode+2)), location+1);
@@ -499,7 +499,7 @@ asmlinkage void illegal_op(struct pt_regs * regs, long interruption_code)
                info.si_signo = signal;
                info.si_errno = 0;
                info.si_code = SEGV_MAPERR;
-               info.si_addr = (void *) location;
+               info.si_addr = (void __user *) location;
                do_trap(interruption_code, signal,
                        "user address fault", regs, &info);
        } else
@@ -520,10 +520,10 @@ asmlinkage void
 specification_exception(struct pt_regs * regs, long interruption_code)
 {
         __u8 opcode[6];
-       __u16 *location = NULL;
+       __u16 __user *location = NULL;
        int signal = 0;
 
-       location = (__u16 *) get_check_address(regs);
+       location = (__u16 __user *) get_check_address(regs);
 
        /*
         * 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)
                        break;
                 case 0xed:
                        get_user(*((__u32 *) (opcode+2)),
-                                (__u32 *)(location+1));
+                                (__u32 __user *)(location+1));
                        signal = math_emu_ed(opcode, regs);
                        break;
                case 0xb2:
index ce05deb..d64b1ea 100644 (file)
@@ -522,12 +522,13 @@ void ack_bad_irq(unsigned int virt_irq)
 }
 
 #ifndef CONFIG_SMP
-extern irqreturn_t timer_interrupt(int, void *, struct pt_regs *);
+extern irqreturn_t timer_interrupt(int, void *);
 
 void timer_irq(int irq, struct pt_regs *regs)
 {
        unsigned long clr_mask = 1 << irq;
        unsigned long tick_mask = tick_ops->softint_mask;
+       struct pt_regs *old_regs;
 
        if (get_softint() & tick_mask) {
                irq = 0;
@@ -535,12 +536,14 @@ void timer_irq(int irq, struct pt_regs *regs)
        }
        clear_softint(clr_mask);
 
+       old_regs = set_irq_regs(regs);
        irq_enter();
 
        kstat_this_cpu.irqs[0]++;
-       timer_interrupt(irq, NULL, regs);
+       timer_interrupt(irq, NULL);
 
        irq_exit();
+       set_irq_regs(old_regs);
 }
 #endif
 
index 00f6fc4..061e1b1 100644 (file)
@@ -45,6 +45,7 @@
 #include <asm/cpudata.h>
 #include <asm/uaccess.h>
 #include <asm/prom.h>
+#include <asm/irq_regs.h>
 
 DEFINE_SPINLOCK(mostek_lock);
 DEFINE_SPINLOCK(rtc_lock);
@@ -452,7 +453,7 @@ static inline void timer_check_rtc(void)
        }
 }
 
-irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
+irqreturn_t timer_interrupt(int irq, void *dev_id)
 {
        unsigned long ticks, compare, pstate;
 
@@ -460,8 +461,8 @@ irqreturn_t timer_interrupt(int irq, void *dev_id, struct pt_regs * regs)
 
        do {
 #ifndef CONFIG_SMP
-               profile_tick(CPU_PROFILING, regs);
-               update_process_times(user_mode(regs));
+               profile_tick(CPU_PROFILING);
+               update_process_times(user_mode(get_irq_regs()));
 #endif
                do_timer(1);
 
index 8ff5c4e..323592d 100644 (file)
@@ -862,15 +862,10 @@ static inline void interrupts_off (amb_dev * dev) {
 /********** interrupt handling **********/
 
 static irqreturn_t interrupt_handler(int irq, void *dev_id) {
-  amb_dev * dev = (amb_dev *) dev_id;
+  amb_dev * dev = dev_id;
   
   PRINTD (DBG_IRQ|DBG_FLOW, "interrupt_handler: %p", dev_id);
   
-  if (!dev_id) {
-    PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq);
-    return IRQ_NONE;
-  }
-  
   {
     u32 interrupt = rd_plain (dev, offsetof(amb_mem, interrupt));
   
index 33e9ee4..f593492 100644 (file)
@@ -1389,15 +1389,6 @@ static irqreturn_t interrupt_handler(int irq, void *dev_id) {
   
   PRINTD (DBG_FLOW, "interrupt_handler: %p", dev_id);
   
-  if (!dev_id) {
-    PRINTD (DBG_IRQ|DBG_ERR, "irq with NULL dev_id: %d", irq);
-    return IRQ_NONE;
-  }
-  if (irq != dev->irq) {
-    PRINTD (DBG_IRQ|DBG_ERR, "irq mismatch: %d", irq);
-    return IRQ_NONE;
-  }
-  
   // definitely for us
   irq_ok = 0;
   while ((int_source = rd_regl (dev, INT_SOURCE_REG_OFF)
index 8895f02..2678255 100644 (file)
@@ -1892,11 +1892,9 @@ static inline void lanai_int_1(struct lanai_dev *lanai, u32 reason)
 
 static irqreturn_t lanai_int(int irq, void *devid)
 {
-       struct lanai_dev *lanai = (struct lanai_dev *) devid;
+       struct lanai_dev *lanai = devid;
        u32 reason;
 
-       (void) irq;     /* unused variables */
-
 #ifdef USE_POWERDOWN
        /*
         * If we're powered down we shouldn't be generating any interrupts -
index 3e8ab84..742d074 100644 (file)
@@ -5254,7 +5254,7 @@ static void DAC960_V2_ProcessCompletedCommand(DAC960_Command_T *Command)
 static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel,
                                       void *DeviceIdentifier)
 {
-  DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
+  DAC960_Controller_T *Controller = DeviceIdentifier;
   void __iomem *ControllerBaseAddress = Controller->BaseAddress;
   DAC960_V2_StatusMailbox_T *NextStatusMailbox;
   unsigned long flags;
@@ -5295,7 +5295,7 @@ static irqreturn_t DAC960_GEM_InterruptHandler(int IRQ_Channel,
 static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel,
                                       void *DeviceIdentifier)
 {
-  DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
+  DAC960_Controller_T *Controller = DeviceIdentifier;
   void __iomem *ControllerBaseAddress = Controller->BaseAddress;
   DAC960_V2_StatusMailbox_T *NextStatusMailbox;
   unsigned long flags;
@@ -5337,7 +5337,7 @@ static irqreturn_t DAC960_BA_InterruptHandler(int IRQ_Channel,
 static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel,
                                       void *DeviceIdentifier)
 {
-  DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
+  DAC960_Controller_T *Controller = DeviceIdentifier;
   void __iomem *ControllerBaseAddress = Controller->BaseAddress;
   DAC960_V2_StatusMailbox_T *NextStatusMailbox;
   unsigned long flags;
@@ -5379,7 +5379,7 @@ static irqreturn_t DAC960_LP_InterruptHandler(int IRQ_Channel,
 static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel,
                                       void *DeviceIdentifier)
 {
-  DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
+  DAC960_Controller_T *Controller = DeviceIdentifier;
   void __iomem *ControllerBaseAddress = Controller->BaseAddress;
   DAC960_V1_StatusMailbox_T *NextStatusMailbox;
   unsigned long flags;
@@ -5417,7 +5417,7 @@ static irqreturn_t DAC960_LA_InterruptHandler(int IRQ_Channel,
 static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel,
                                       void *DeviceIdentifier)
 {
-  DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
+  DAC960_Controller_T *Controller = DeviceIdentifier;
   void __iomem *ControllerBaseAddress = Controller->BaseAddress;
   DAC960_V1_StatusMailbox_T *NextStatusMailbox;
   unsigned long flags;
@@ -5455,7 +5455,7 @@ static irqreturn_t DAC960_PG_InterruptHandler(int IRQ_Channel,
 static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel,
                                       void *DeviceIdentifier)
 {
-  DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
+  DAC960_Controller_T *Controller = DeviceIdentifier;
   void __iomem *ControllerBaseAddress = Controller->BaseAddress;
   unsigned long flags;
 
@@ -5493,7 +5493,7 @@ static irqreturn_t DAC960_PD_InterruptHandler(int IRQ_Channel,
 static irqreturn_t DAC960_P_InterruptHandler(int IRQ_Channel,
                                      void *DeviceIdentifier)
 {
-  DAC960_Controller_T *Controller = (DAC960_Controller_T *) DeviceIdentifier;
+  DAC960_Controller_T *Controller = DeviceIdentifier;
   void __iomem *ControllerBaseAddress = Controller->BaseAddress;
   unsigned long flags;
 
index 60e1978..f574962 100644 (file)
@@ -850,10 +850,6 @@ static irqreturn_t mcdx_intr(int irq, void *dev_id)
        struct s_drive_stuff *stuffp = dev_id;
        unsigned char b;
 
-       if (stuffp == NULL) {
-               xwarn("mcdx: no device for intr %d\n", irq);
-               return IRQ_NONE;
-       }
 #ifdef AK2
        if (!stuffp->busy && stuffp->pending)
                stuffp->int_err = 1;
index 6b03918..9e7283b 100644 (file)
@@ -88,7 +88,7 @@ void RIOHostReset(unsigned int, struct DpRam __iomem *, unsigned int);
 
 /* riointr.c */
 void RIOTxEnable(char *);
-void RIOServiceHost(struct rio_info *, struct Host *, int);
+void RIOServiceHost(struct rio_info *, struct Host *);
 int riotproc(struct rio_info *, struct ttystatics *, int, int);
 
 /* rioparam.c */
index 3bea594..c382df0 100644 (file)
@@ -368,7 +368,7 @@ static irqreturn_t rio_interrupt(int irq, void *ptr)
        struct Host *HostP;
        func_enter();
 
-       HostP = (struct Host *) ptr;    /* &p->RIOHosts[(long)ptr]; */
+       HostP = ptr;                    /* &p->RIOHosts[(long)ptr]; */
        rio_dprintk(RIO_DEBUG_IFLOW, "rio: enter rio_interrupt (%d/%d)\n", irq, HostP->Ivec);
 
        /* 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)
                return IRQ_HANDLED;
        }
 
-       RIOServiceHost(p, HostP, irq);
+       RIOServiceHost(p, HostP);
 
        rio_dprintk(RIO_DEBUG_IFLOW, "riointr() doing host %p type %d\n", ptr, HostP->Type);
 
index 0bd0904..eeda40c 100644 (file)
@@ -181,7 +181,7 @@ static int RupIntr;
 static int RxIntr;
 static int TxIntr;
 
-void RIOServiceHost(struct rio_info *p, struct Host *HostP, int From)
+void RIOServiceHost(struct rio_info *p, struct Host *HostP)
 {
        rio_spin_lock(&HostP->HostLock);
        if ((HostP->Flags & RUN_STATE) != RC_RUNNING) {
index be68cfb..5ab32b3 100644 (file)
@@ -559,11 +559,10 @@ static irqreturn_t rc_interrupt(int irq, void * dev_id)
        int handled = 0;
 
        bp = IRQ_to_board[irq];
-       
-       if (!bp || !(bp->flags & RC_BOARD_ACTIVE))  {
+
+       if (!(bp->flags & RC_BOARD_ACTIVE))
                return IRQ_NONE;
-       }
-       
+
        while ((++loop < 16) && ((status = ~(rc_in(bp, RC_BSR))) &
                                 (RC_BSR_TOUT | RC_BSR_TINT |
                                  RC_BSR_MINT | RC_BSR_RINT))) {
index 6022495..d0b88d0 100644 (file)
@@ -912,7 +912,7 @@ static irqreturn_t sx_interrupt(int irq, void *dev_id)
        spin_lock_irqsave(&bp->lock, flags);
 
        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);
-       if (!bp || !(bp->flags & SX_BOARD_ACTIVE)) {
+       if (!(bp->flags & SX_BOARD_ACTIVE)) {
                dprintk (SX_DEBUG_IRQ, "sx: False interrupt. irq %d.\n", irq);
                spin_unlock_irqrestore(&bp->lock, flags);
                func_exit();
index 3014495..3cac237 100644 (file)
@@ -16,8 +16,6 @@
 #include "act2000_isa.h"
 #include "capi.h"
 
-static act2000_card *irq2card_map[16];
-
 /*
  * Reset Controller, then try to read the Card's signature.
  + Return:
@@ -65,14 +63,9 @@ act2000_isa_detect(unsigned short portbase)
 static irqreturn_t
 act2000_isa_interrupt(int irq, void *dev_id)
 {
-        act2000_card *card = irq2card_map[irq];
+        act2000_card *card = dev_id;
         u_char istatus;
 
-        if (!card) {
-                printk(KERN_WARNING
-                       "act2000: Spurious interrupt!\n");
-                return IRQ_NONE;
-        }
         istatus = (inb(ISA_PORT_ISR) & 0x07);
         if (istatus & ISA_ISR_OUT) {
                 /* RX fifo has data */
@@ -139,17 +132,15 @@ int
 act2000_isa_config_irq(act2000_card * card, short irq)
 {
         if (card->flags & ACT2000_FLAGS_IVALID) {
-                free_irq(card->irq, NULL);
-                irq2card_map[card->irq] = NULL;
+                free_irq(card->irq, card);
         }
         card->flags &= ~ACT2000_FLAGS_IVALID;
         outb(ISA_COR_IRQOFF, ISA_PORT_COR);
         if (!irq)
                 return 0;
 
-       if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, NULL)) {
+       if (!request_irq(irq, &act2000_isa_interrupt, 0, card->regname, card)) {
                card->irq = irq;
-               irq2card_map[card->irq] = card;
                card->flags |= ACT2000_FLAGS_IVALID;
                 printk(KERN_WARNING
                        "act2000: Could not request irq %d\n",irq);
@@ -188,10 +179,9 @@ act2000_isa_release(act2000_card * card)
         unsigned long flags;
 
         spin_lock_irqsave(&card->lock, flags);
-        if (card->flags & ACT2000_FLAGS_IVALID) {
-                free_irq(card->irq, NULL);
-                irq2card_map[card->irq] = NULL;
-        }
+        if (card->flags & ACT2000_FLAGS_IVALID)
+                free_irq(card->irq, card);
+
         card->flags &= ~ACT2000_FLAGS_IVALID;
         if (card->flags & ACT2000_FLAGS_PVALID)
                 release_region(card->port, ISA_REGION);
index d9d5020..168e431 100644 (file)
@@ -1415,7 +1415,7 @@ zoran_irq (int             irq,
        struct zoran *zr;
        unsigned long flags;
 
-       zr = (struct zoran *) dev_id;
+       zr = dev_id;
        count = 0;
 
        if (zr->testing) {
index b174866..1ba8754 100644 (file)
@@ -48,7 +48,7 @@ static void tifm_7xx1_remove_media(void *adapter)
                        printk(KERN_INFO DRIVER_NAME
                               ": demand removing card from socket %d\n", cnt);
                        sock = fm->sockets[cnt];
-                       fm->sockets[cnt] = 0;
+                       fm->sockets[cnt] = NULL;
                        fm->remove_mask &= ~(1 << cnt);
 
                        writel(0x0e00, sock->addr + SOCK_CONTROL);
@@ -118,7 +118,7 @@ static irqreturn_t tifm_7xx1_isr(int irq, void *dev_id)
        return IRQ_HANDLED;
 }
 
-static tifm_media_id tifm_7xx1_toggle_sock_power(char *sock_addr, int is_x2)
+static tifm_media_id tifm_7xx1_toggle_sock_power(char __iomem *sock_addr, int is_x2)
 {
        unsigned int s_state;
        int cnt;
@@ -163,7 +163,8 @@ static tifm_media_id tifm_7xx1_toggle_sock_power(char *sock_addr, int is_x2)
        return (readl(sock_addr + SOCK_PRESENT_STATE) >> 4) & 7;
 }
 
-inline static char *tifm_7xx1_sock_addr(char *base_addr, unsigned int sock_num)
+inline static char __iomem *
+tifm_7xx1_sock_addr(char __iomem *base_addr, unsigned int sock_num)
 {
        return base_addr + ((sock_num + 1) << 10);
 }
@@ -176,7 +177,7 @@ static void tifm_7xx1_insert_media(void *adapter)
        char *card_name = "xx";
        int cnt, ok_to_register;
        unsigned int insert_mask;
-       struct tifm_dev *new_sock = 0;
+       struct tifm_dev *new_sock = NULL;
 
        if (!class_device_get(&fm->cdev))
                return;
@@ -230,7 +231,7 @@ static void tifm_7xx1_insert_media(void *adapter)
                                if (!ok_to_register ||
                                            device_register(&new_sock->dev)) {
                                        spin_lock_irqsave(&fm->lock, flags);
-                                       fm->sockets[cnt] = 0;
+                                       fm->sockets[cnt] = NULL;
                                        spin_unlock_irqrestore(&fm->lock,
                                                                flags);
                                        tifm_free_device(&new_sock->dev);
@@ -390,7 +391,7 @@ static void tifm_7xx1_remove(struct pci_dev *dev)
 
        tifm_remove_adapter(fm);
 
-       pci_set_drvdata(dev, 0);
+       pci_set_drvdata(dev, NULL);
 
        iounmap(fm->addr);
        pci_intx(dev, 0);
index cca5f85..ee32613 100644 (file)
@@ -157,7 +157,7 @@ struct tifm_dev *tifm_alloc_device(struct tifm_adapter *fm, unsigned int id)
                dev->wq = create_singlethread_workqueue(dev->wq_name);
                if (!dev->wq) {
                        kfree(dev);
-                       return 0;
+                       return NULL;
                }
                dev->dev.parent = fm->dev;
                dev->dev.bus = &tifm_bus_type;
index 6d23dc0..2bacff6 100644 (file)
@@ -501,13 +501,13 @@ static void tifm_sd_end_cmd(void *data)
        struct tifm_dev *sock = host->dev;
        struct mmc_host *mmc = tifm_get_drvdata(sock);
        struct mmc_request *mrq;
-       struct mmc_data *r_data = 0;
+       struct mmc_data *r_data = NULL;
        unsigned long flags;
 
        spin_lock_irqsave(&sock->lock, flags);
 
        mrq = host->req;
-       host->req = 0;
+       host->req = NULL;
        host->state = IDLE;
 
        if (!mrq) {
@@ -546,7 +546,7 @@ static void tifm_sd_request_nodma(struct mmc_host *mmc, struct mmc_request *mrq)
        struct tifm_dev *sock = host->dev;
        unsigned long flags;
        struct mmc_data *r_data = mrq->cmd->data;
-       char *t_buffer = 0;
+       char *t_buffer = NULL;
 
        if (r_data) {
                t_buffer = kmap(r_data->sg->page);
@@ -613,13 +613,13 @@ static void tifm_sd_end_cmd_nodma(void *data)
        struct tifm_dev *sock = host->dev;
        struct mmc_host *mmc = tifm_get_drvdata(sock);
        struct mmc_request *mrq;
-       struct mmc_data *r_data = 0;
+       struct mmc_data *r_data = NULL;
        unsigned long flags;
 
        spin_lock_irqsave(&sock->lock, flags);
 
        mrq = host->req;
-       host->req = 0;
+       host->req = NULL;
        host->state = IDLE;
 
        if (!mrq) {
@@ -644,7 +644,7 @@ static void tifm_sd_end_cmd_nodma(void *data)
                        r_data->bytes_xfered += r_data->blksz -
                                readl(sock->addr + SOCK_MMCSD_BLOCK_LEN) + 1;
                }
-               host->buffer = 0;
+               host->buffer = NULL;
                host->buffer_pos = 0;
                host->buffer_size = 0;
        }
@@ -895,7 +895,7 @@ static void tifm_sd_remove(struct tifm_dev *sock)
                sock->addr + SOCK_DMA_FIFO_INT_ENABLE_CLEAR);
        writel(0, sock->addr + SOCK_DMA_FIFO_INT_ENABLE_SET);
 
-       tifm_set_drvdata(sock, 0);
+       tifm_set_drvdata(sock, NULL);
        mmc_free_host(mmc);
 }
 
index 7ad0a54..f791bf0 100644 (file)
@@ -912,16 +912,11 @@ el3_start_xmit(struct sk_buff *skb, struct net_device *dev)
 static irqreturn_t
 el3_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *)dev_id;
+       struct net_device *dev = dev_id;
        struct el3_private *lp;
        int ioaddr, status;
        int i = max_interrupt_work;
 
-       if (dev == NULL) {
-               printk ("el3_interrupt(): irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       }
-
        lp = netdev_priv(dev);
        spin_lock(&lp->lock);
 
index 1c97271..9184946 100644 (file)
@@ -902,14 +902,11 @@ static void *alloc_rfa(struct net_device *dev, void *ptr)
 static irqreturn_t
 elmc_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        unsigned short stat;
        struct priv *p;
 
-       if (dev == NULL) {
-               printk(KERN_ERR "elmc-interrupt: irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       } else if (!netif_running(dev)) {
+       if (!netif_running(dev)) {
                /* The 3c523 has this habit of generating interrupts during the
                   reset.  I'm not sure if the ni52 has this same problem, but it's
                   really annoying if we haven't finished initializing it.  I was
index d516c32..f4aca53 100644 (file)
@@ -1324,11 +1324,6 @@ static irqreturn_t mc32_interrupt(int irq, void *dev_id)
        int rx_event = 0;
        int tx_event = 0;
 
-       if (dev == NULL) {
-               printk(KERN_WARNING "%s: irq %d for unknown device.\n", cardname, irq);
-               return IRQ_NONE;
-       }
-
        ioaddr = dev->base_addr;
        lp = netdev_priv(dev);
 
index fa3442c..3d1c599 100644 (file)
@@ -406,14 +406,8 @@ irqreturn_t ei_interrupt(int irq, void *dev_id)
        int interrupts, nr_serviced = 0;
        struct ei_device *ei_local;
 
-       if (dev == NULL)
-       {
-               printk ("net_interrupt(): irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       }
-
        e8390_base = dev->base_addr;
-       ei_local = (struct ei_device *) netdev_priv(dev);
+       ei_local = netdev_priv(dev);
 
        /*
         *      Protect the irq test too.
index 062f80e..2d306fc 100644 (file)
@@ -598,17 +598,13 @@ static int atp_send_packet(struct sk_buff *skb, struct net_device *dev)
    Handle the network interface interrupts. */
 static irqreturn_t atp_interrupt(int irq, void *dev_instance)
 {
-       struct net_device *dev = (struct net_device *)dev_instance;
+       struct net_device *dev = dev_instance;
        struct net_local *lp;
        long ioaddr;
        static int num_tx_since_rx;
        int boguscount = max_interrupt_work;
        int handled = 0;
 
-       if (dev == NULL) {
-               printk(KERN_ERR "ATP_interrupt(): irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       }
        ioaddr = dev->base_addr;
        lp = netdev_priv(dev);
 
index d9b006c..690bb40 100644 (file)
@@ -265,12 +265,6 @@ static irqreturn_t de600_interrupt(int irq, void *dev_id)
        int             retrig = 0;
        int             boguscount = 0;
 
-       /* This might just as well be deleted now, no crummy drivers present :-) */
-       if ((dev == NULL) || (DE600_IRQ != irq)) {
-               printk(KERN_ERR "%s: bogus interrupt %d\n", dev?dev->name:"DE-600", irq);
-               return IRQ_NONE;
-       }
-
        spin_lock(&de600_lock);
 
        select_nic();
index e179aa1..00e2a8a 100644 (file)
@@ -696,7 +696,7 @@ out:
 
 static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
 
        printk("%s: DMA error\n", dev->name);
        return IRQ_HANDLED;
@@ -704,7 +704,7 @@ static irqreturn_t lance_dma_merr_int(const int irq, void *dev_id)
 
 static irqreturn_t lance_interrupt(const int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct lance_private *lp = netdev_priv(dev);
        volatile struct lance_regs *ll = lp->ll;
        int csr0;
index 6b1234b..a795202 100644 (file)
@@ -897,8 +897,8 @@ static int dgrs_ioctl(struct net_device *devN, struct ifreq *ifr, int cmd)
 
 static irqreturn_t dgrs_intr(int irq, void *dev_id)
 {
-       struct net_device       *dev0 = (struct net_device *) dev_id;
-       DGRS_PRIV       *priv0 = (DGRS_PRIV *) dev0->priv;
+       struct net_device       *dev0 = dev_id;
+       DGRS_PRIV       *priv0 = dev0->priv;
        I596_CB         *cbp;
        int             cmd;
        int             i;
index aae454a..a4eb0dc 100644 (file)
@@ -994,16 +994,6 @@ static int eepro_open(struct net_device *dev)
                return -EAGAIN;
        }
 
-#ifdef irq2dev_map
-       if  (((irq2dev_map[dev->irq] != 0)
-               || (irq2dev_map[dev->irq] = dev) == 0) &&
-               (irq2dev_map[dev->irq]!=dev)) {
-               /* printk("%s: IRQ map wrong\n", dev->name); */
-               free_irq(dev->irq, dev);
-               return -EAGAIN;
-       }
-#endif
-
        /* Initialize the 82595. */
 
        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)
 static irqreturn_t
 eepro_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev =  (struct net_device *)dev_id;
-                             /* (struct net_device *)(irq2dev_map[irq]);*/
+       struct net_device *dev = dev_id;
        struct eepro_local *lp;
        int ioaddr, status, boguscount = 20;
        int handled = 0;
 
-       if (dev == NULL) {
-                printk (KERN_ERR "eepro_interrupt(): irq %d for unknown device.\\n", irq);
-                return IRQ_NONE;
-        }
-
        lp = netdev_priv(dev);
 
         spin_lock(&lp->lock);
@@ -1288,10 +1272,6 @@ static int eepro_close(struct net_device *dev)
        /* release the interrupt */
        free_irq(dev->irq, dev);
 
-#ifdef irq2dev_map
-       irq2dev_map[dev->irq] = 0;
-#endif
-
        /* Update the statistics here. What statistics? */
 
        return 0;
index 05ca730..e14be02 100644 (file)
@@ -796,13 +796,6 @@ static irqreturn_t eexp_irq(int irq, void *dev_info)
        unsigned short ioaddr,status,ack_cmd;
        unsigned short old_read_ptr, old_write_ptr;
 
-       if (dev==NULL)
-       {
-               printk(KERN_WARNING "eexpress: irq %d for unknown device\n",
-                      irq);
-               return IRQ_NONE;
-       }
-
        lp = netdev_priv(dev);
        ioaddr = dev->base_addr;
 
index 971e2de..cebf8c3 100644 (file)
@@ -662,19 +662,13 @@ static int ali_ircc_read_dongle_id (int i, chipio_t *info)
  */
 static irqreturn_t ali_ircc_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct ali_ircc_cb *self;
        int ret;
                
        IRDA_DEBUG(2, "%s(), ---------------- Start ----------------\n", __FUNCTION__);
                
-       if (!dev) {
-               IRDA_WARNING("%s: irq %d for unknown device.\n",
-                            ALI_IRCC_DRIVER_NAME, irq);
-               return IRQ_NONE;
-       }       
-       
-       self = (struct ali_ircc_cb *) dev->priv;
+       self = dev->priv;
        
        spin_lock(&self->lock);
        
index 7a91281..636d063 100644 (file)
@@ -657,12 +657,6 @@ toshoboe_makemttpacket (struct toshoboe_cb *self, void *buf, int mtt)
   return xbofs;
 }
 
-static int toshoboe_invalid_dev(int irq)
-{
-  printk (KERN_WARNING DRIVER_NAME ": irq %d for unknown device.\n", irq);
-  return 1;
-}
-
 #ifdef USE_PROBE
 /***********************************************************************/
 /* Probe code */
@@ -711,12 +705,9 @@ stuff_byte (__u8 byte, __u8 * buf)
 static irqreturn_t
 toshoboe_probeinterrupt (int irq, void *dev_id)
 {
-  struct toshoboe_cb *self = (struct toshoboe_cb *) dev_id;
+  struct toshoboe_cb *self = dev_id;
   __u8 irqstat;
 
-  if (self == NULL && toshoboe_invalid_dev(irq))
-    return IRQ_NONE;
-
   irqstat = INB (OBOE_ISR);
 
 /* was it us */
index 6ea78ec..654a68b 100644 (file)
@@ -766,18 +766,14 @@ static inline void irport_receive(struct irport_cb *self)
  */
 static irqreturn_t irport_interrupt(int irq, void *dev_id) 
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct irport_cb *self;
        int boguscount = 0;
        int iobase;
        int iir, lsr;
        int handled = 0;
 
-       if (!dev) {
-               IRDA_WARNING("%s() irq %d for unknown device.\n", __FUNCTION__, irq);
-               return IRQ_NONE;
-       }
-       self = (struct irport_cb *) dev->priv;
+       self = dev->priv;
 
        spin_lock(&self->lock);
 
index 4393168..3f46b84 100644 (file)
@@ -74,7 +74,7 @@ struct irport_cb {
        /* For piggyback drivers */
        void *priv;                
        void (*change_speed)(void *priv, __u32 speed);
-       int (*interrupt)(int irq, void *dev_id);
+       irqreturn_t (*interrupt)(int irq, void *dev_id);
 };
 
 #endif /* IRPORT_H */
index ea12e99..29b5ccd 100644 (file)
@@ -2068,17 +2068,12 @@ static void nsc_ircc_fir_interrupt(struct nsc_ircc_cb *self, int iobase,
  */
 static irqreturn_t nsc_ircc_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct nsc_ircc_cb *self;
        __u8 bsr, eir;
        int iobase;
 
-       if (!dev) {
-               IRDA_WARNING("%s: irq %d for unknown device.\n",
-                            driver_name, irq);
-               return IRQ_NONE;
-       }
-       self = (struct nsc_ircc_cb *) dev->priv;
+       self = dev->priv;
 
        spin_lock(&self->lock); 
 
index b4fb92a..4212657 100644 (file)
@@ -1113,17 +1113,12 @@ static __u8 w83977af_fir_interrupt(struct w83977af_ir *self, int isr)
  */
 static irqreturn_t w83977af_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct w83977af_ir *self;
        __u8 set, icr, isr;
        int iobase;
 
-       if (!dev) {
-               printk(KERN_WARNING "%s: irq %d for unknown device.\n", 
-                       driver_name, irq);
-               return IRQ_NONE;
-       }
-       self = (struct w83977af_ir *) dev->priv;
+       self = dev->priv;
 
        iobase = self->io.fir_base;
 
index 7afac47..6efbd49 100644 (file)
@@ -1019,11 +1019,6 @@ static irqreturn_t lance_interrupt(int irq, void *dev_id)
        int csr0, ioaddr, boguscnt=10;
        int must_restart;
 
-       if (dev == NULL) {
-               printk ("lance_interrupt(): irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       }
-
        ioaddr = dev->base_addr;
        lp = dev->priv;
 
index e5f3669..5ddd574 100644 (file)
@@ -1201,14 +1201,8 @@ static irqreturn_t ax_interrupt(int irq, void *dev_id)
        struct ei_device *ei_local;
        int handled = 0;
 
-       if (dev == NULL) 
-       {
-               printk ("net_interrupt(): irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       }
-    
        e8390_base = dev->base_addr;
-       ei_local = (struct ei_device *) netdev_priv(dev);
+       ei_local = netdev_priv(dev);
 
        /*
         *      Protect the irq test too.
index c73e2f2..36f9d98 100644 (file)
@@ -2569,13 +2569,6 @@ pcnet32_interrupt(int irq, void *dev_id)
        u16 csr0;
        int boguscnt = max_interrupt_work;
 
-       if (!dev) {
-               if (pcnet32_debug & NETIF_MSG_INTR)
-                       printk(KERN_DEBUG "%s(): irq %d for unknown device\n",
-                              __FUNCTION__, irq);
-               return IRQ_NONE;
-       }
-
        ioaddr = dev->base_addr;
        lp = dev->priv;
 
index c0b333d..71afb27 100644 (file)
@@ -909,11 +909,6 @@ plip_interrupt(int irq, void *dev_id)
        struct plip_local *rcv;
        unsigned char c0;
 
-       if (dev == NULL) {
-               printk(KERN_DEBUG "plip_interrupt: irq %d for unknown device.\n", irq);
-               return;
-       }
-
        nl = netdev_priv(dev);
        rcv = &nl->rcv_data;
 
index c9efad8..b269513 100644 (file)
@@ -747,7 +747,7 @@ static int lan_saa9730_rx(struct net_device *dev)
 
 static irqreturn_t lan_saa9730_interrupt(const int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct lan_saa9730_private *lp = netdev_priv(dev);
 
        if (lan_saa9730_debug > 5)
index dc30dee..b9fa4fb 100644 (file)
@@ -1084,19 +1084,13 @@ static irqreturn_t sb1000_interrupt(int irq, void *dev_id)
        char *name;
        unsigned char st;
        int ioaddr[2];
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct sb1000_private *lp = netdev_priv(dev);
 
        const unsigned char Command0[6] = {0x80, 0x2c, 0x00, 0x00, 0x00, 0x00};
        const unsigned char Command1[6] = {0x80, 0x2e, 0x00, 0x00, 0x00, 0x00};
        const int MaxRxErrorCount = 6;
 
-       if (dev == NULL) {
-               printk(KERN_ERR "sb1000_interrupt(): irq %d for unknown device.\n",
-                       irq);
-               return IRQ_NONE;
-       }
-
        ioaddr[0] = dev->base_addr;
        /* mem_start holds the second I/O address */
        ioaddr[1] = dev->mem_start;
index 06ea262..9733a11 100644 (file)
@@ -616,15 +616,10 @@ static int skfp_close(struct net_device *dev)
 
 irqreturn_t skfp_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct s_smc *smc;      /* private board structure pointer */
        skfddi_priv *bp;
 
-       if (dev == NULL) {
-               printk("%s: irq %d for unknown device\n", dev->name, irq);
-               return IRQ_NONE;
-       }
-
        smc = netdev_priv(dev);
        bp = &smc->os;
 
index cfece96..ed7aa0a 100644 (file)
@@ -295,15 +295,10 @@ static int sonic_send_packet(struct sk_buff *skb, struct net_device *dev)
  */
 static irqreturn_t sonic_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
+       struct net_device *dev = dev_id;
        struct sonic_local *lp = netdev_priv(dev);
        int status;
 
-       if (dev == NULL) {
-               printk(KERN_ERR "sonic_interrupt: irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       }
-
        if (!(status = SONIC_READ(SONIC_ISR) & SONIC_IMR_DEFAULT))
                return IRQ_NONE;
 
index 45d07fa..9d7cd13 100644 (file)
@@ -2095,8 +2095,8 @@ static void happy_meal_rx(struct happy_meal *hp, struct net_device *dev)
 
 static irqreturn_t happy_meal_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *) dev_id;
-       struct happy_meal *hp  = dev->priv;
+       struct net_device *dev = dev_id;
+       struct happy_meal *hp  = netdev_priv(dev);
        u32 happy_status       = hme_read32(hp, hp->gregs + GREG_STAT);
 
        HMD(("happy_meal_interrupt: status=%08x ", happy_status));
index 9207e19..5b00d79 100644 (file)
@@ -822,7 +822,7 @@ out:
 
 static irqreturn_t lance_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *)dev_id;
+       struct net_device *dev = dev_id;
        struct lance_private *lp = netdev_priv(dev);
        int csr0;
 
index 020e781..7874eb1 100644 (file)
@@ -468,7 +468,7 @@ static void qe_tx_reclaim(struct sunqe *qep);
  */
 static irqreturn_t qec_interrupt(int irq, void *dev_id)
 {
-       struct sunqec *qecp = (struct sunqec *) dev_id;
+       struct sunqec *qecp = dev_id;
        u32 qec_status;
        int channel = 0;
 
index 9bd4cba..46dabdb 100644 (file)
@@ -1990,15 +1990,8 @@ static irqreturn_t smctr_interrupt(int irq, void *dev_id)
         __u8 isb_type, isb_subtype;
         __u16 isb_index;
 
-        if(dev == NULL)
-        {
-                printk(KERN_CRIT "%s: irq %d for unknown device.\n", dev->name, irq);
-                return IRQ_NONE;
-        }
-
         ioaddr = dev->base_addr;
         tp = netdev_priv(dev);
-        
 
         if(tp->status == NOT_INITIALIZED)
                 return IRQ_NONE;
index c0ab6e4..ea797ca 100644 (file)
@@ -751,11 +751,6 @@ irqreturn_t tms380tr_interrupt(int irq, void *dev_id)
        unsigned short irq_type;
        int handled = 0;
 
-       if(dev == NULL) {
-               printk(KERN_INFO "%s: irq %d for unknown device.\n", dev->name, irq);
-               return IRQ_NONE;
-       }
-
        tp = netdev_priv(dev);
 
        irq_type = SIFREADW(SIFSTS);
index e17f977..3f4b640 100644 (file)
@@ -1540,16 +1540,12 @@ de4x5_queue_pkt(struct sk_buff *skb, struct net_device *dev)
 static irqreturn_t
 de4x5_interrupt(int irq, void *dev_id)
 {
-    struct net_device *dev = (struct net_device *)dev_id;
+    struct net_device *dev = dev_id;
     struct de4x5_private *lp;
     s32 imr, omr, sts, limit;
     u_long iobase;
     unsigned int handled = 0;
 
-    if (dev == NULL) {
-       printk ("de4x5_interrupt(): irq %d for unknown device.\n", irq);
-       return IRQ_NONE;
-    }
     lp = netdev_priv(dev);
     spin_lock(&lp->lock);
     iobase = dev->base_addr;
index 12363e0..6e5f1c8 100644 (file)
@@ -303,9 +303,9 @@ out:        return ret;
  */
 static irqreturn_t cycx_isr(int irq, void *dev_id)
 {
-       struct cycx_device *card = (struct cycx_device *)dev_id;
+       struct cycx_device *card = dev_id;
 
-       if (!card || card->wandev.state == WAN_UNCONFIGURED)
+       if (card->wandev.state == WAN_UNCONFIGURED)
                goto out;
 
        if (card->in_isr) {
index 5715d25..6a485f0 100644 (file)
@@ -875,13 +875,7 @@ static irqreturn_t sdla_isr(int irq, void *dev_id)
 
        dev = dev_id;
 
-       if (dev == NULL)
-       {
-               printk(KERN_WARNING "sdla_isr(): irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       }
-
-       flp = dev->priv;
+       flp = netdev_priv(dev);
 
        if (!flp->initialized)
        {
index 793da5f..b779c7d 100644 (file)
@@ -1954,7 +1954,7 @@ static void __orinoco_ev_wterr(struct net_device *dev, hermes_t *hw)
 
 irqreturn_t orinoco_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *)dev_id;
+       struct net_device *dev = dev_id;
        struct orinoco_private *priv = netdev_priv(dev);
        hermes_t *hw = &priv->hw;
        int count = MAX_IRQLOOPS_PER_IRQ;
index cadfe13..aafb301 100644 (file)
@@ -4119,21 +4119,12 @@ static irqreturn_t
 wavelan_interrupt(int          irq,
                  void *        dev_id)
 {
-  struct net_device *  dev;
+  struct net_device *  dev = dev_id;
   net_local *  lp;
   kio_addr_t   base;
   int          status0;
   u_int                tx_status;
 
-  if ((dev = dev_id) == NULL)
-    {
-#ifdef DEBUG_INTERRUPT_ERROR
-      printk(KERN_WARNING "wavelan_interrupt(): irq %d for unknown device.\n",
-            irq);
-#endif
-      return IRQ_NONE;
-    }
-
 #ifdef DEBUG_INTERRUPT_TRACE
   printk(KERN_DEBUG "%s: ->wavelan_interrupt()\n", dev->name);
 #endif
index a143035..5b98a78 100644 (file)
@@ -1155,25 +1155,18 @@ static inline void wl3501_ack_interrupt(struct wl3501_card *this)
  */
 static irqreturn_t wl3501_interrupt(int irq, void *dev_id)
 {
-       struct net_device *dev = (struct net_device *)dev_id;
+       struct net_device *dev = dev_id;
        struct wl3501_card *this;
-       int handled = 1;
 
-       if (!dev)
-               goto unknown;
-       this = dev->priv;
+       this = netdev_priv(dev);
        spin_lock(&this->lock);
        wl3501_ack_interrupt(this);
        wl3501_block_interrupt(this);
        wl3501_rx_interrupt(dev);
        wl3501_unblock_interrupt(this);
        spin_unlock(&this->lock);
-out:
-       return IRQ_RETVAL(handled);
-unknown:
-       handled = 0;
-       printk(KERN_ERR "%s: irq %d for unknown device.\n", __FUNCTION__, irq);
-       goto out;
+
+       return IRQ_HANDLED;
 }
 
 static int wl3501_reset_board(struct wl3501_card *this)
index ac60021..2412ce4 100644 (file)
@@ -896,13 +896,6 @@ static irqreturn_t yellowfin_interrupt(int irq, void *dev_instance)
        int boguscnt = max_interrupt_work;
        unsigned int handled = 0;
 
-#ifndef final_version                  /* Can never occur. */
-       if (dev == NULL) {
-               printk (KERN_ERR "yellowfin_interrupt(): irq %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       }
-#endif
-
        yp = netdev_priv(dev);
        ioaddr = yp->base;
 
index 2068a10..b24b072 100644 (file)
@@ -610,11 +610,6 @@ static irqreturn_t znet_interrupt(int irq, void *dev_id)
        int boguscnt = 20;
        int handled = 0;
 
-       if (dev == NULL) {
-               printk(KERN_WARNING "znet_interrupt(): IRQ %d for unknown device.\n", irq);
-               return IRQ_NONE;
-       }
-
        spin_lock (&znet->lock);
 
        ioaddr = dev->base_addr;
index 991e084..7f5df9a 100644 (file)
@@ -66,7 +66,7 @@ static int at91_cf_ss_init(struct pcmcia_socket *s)
 
 static irqreturn_t at91_cf_irq(int irq, void *_cf)
 {
-       struct at91_cf_socket   *cf = (struct at91_cf_socket *) _cf;
+       struct at91_cf_socket *cf = _cf;
 
        if (irq == cf->board->det_pin) {
                unsigned present = at91_cf_present(cf);
index db3c26b..caca0dc 100644 (file)
@@ -650,7 +650,7 @@ static int hs_set_mem_map(struct pcmcia_socket *s, struct pccard_mem_map *mem)
  */
 static int hs_irq_demux(int irq, void *dev)
 {
-       hs_socket_t *sp = (hs_socket_t *)dev;
+       hs_socket_t *sp = dev;
        u_int cscr;
        
        DPRINTK("hs_irq_demux(irq=%d)\n", irq);
@@ -673,11 +673,10 @@ static int hs_irq_demux(int irq, void *dev)
  
 static irqreturn_t hs_interrupt(int irq, void *dev)
 {
-       hs_socket_t *sp = (hs_socket_t *)dev;
+       hs_socket_t *sp = dev;
        u_int events = 0;
        u_int cscr;
-       
-       
+
        cscr = hs_in(sp, CSCR);
        
        DPRINTK("hs_interrupt, cscr=%04x\n", cscr);
index 3896278..d461381 100644 (file)
@@ -168,7 +168,7 @@ enum Phase {
 };
 
 /* Static function prototypes */
-static void NCR53c406a_intr(int, void *);
+static void NCR53c406a_intr(void *);
 static irqreturn_t do_NCR53c406a_intr(int, void *);
 static void chip_init(void);
 static void calc_port_addr(void);
@@ -685,7 +685,7 @@ static void wait_intr(void)
                return;
        }
 
-       NCR53c406a_intr(0, NULL, NULL);
+       NCR53c406a_intr(NULL);
 }
 #endif
 
@@ -767,12 +767,12 @@ static irqreturn_t do_NCR53c406a_intr(int unused, void *dev_id)
        struct Scsi_Host *dev = dev_id;
 
        spin_lock_irqsave(dev->host_lock, flags);
-       NCR53c406a_intr(0, dev_id);
+       NCR53c406a_intr(dev_id);
        spin_unlock_irqrestore(dev->host_lock, flags);
        return IRQ_HANDLED;
 }
 
-static void NCR53c406a_intr(int unused, void *dev_id)
+static void NCR53c406a_intr(void *dev_id)
 {
        DEB(unsigned char fifo_size;
            )
index e04c2bc..a0d1cee 100644 (file)
@@ -759,12 +759,7 @@ static inline Scsi_Cmnd *remove_SC(Scsi_Cmnd **SC, Scsi_Cmnd *SCp)
 
 static irqreturn_t swintr(int irqno, void *dev_id)
 {
-       struct Scsi_Host *shpnt = (struct Scsi_Host *)dev_id;
-
-       if (!shpnt) {
-               printk(KERN_ERR "aha152x: catched software interrupt %d for unknown controller.\n", irqno);
-               return IRQ_NONE;
-       }
+       struct Scsi_Host *shpnt = dev_id;
 
        HOSTDATA(shpnt)->swint++;
 
index 7f0adf9..bcd7fff 100644 (file)
@@ -6345,12 +6345,12 @@ aic7xxx_handle_command_completion_intr(struct aic7xxx_host *p)
  *   SCSI controller interrupt handler.
  *-F*************************************************************************/
 static void
-aic7xxx_isr(int irq, void *dev_id)
+aic7xxx_isr(void *dev_id)
 {
   struct aic7xxx_host *p;
   unsigned char intstat;
 
-  p = (struct aic7xxx_host *)dev_id;
+  p = dev_id;
 
   /*
    * 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)
   p->flags |= AHC_IN_ISR;
   do
   {
-    aic7xxx_isr(irq, dev_id);
+    aic7xxx_isr(dev_id);
   } while ( (aic_inb(p, INTSTAT) & INT_PEND) );
   aic7xxx_done_cmds_complete(p);
   aic7xxx_run_waiting_queues(p);
@@ -10377,7 +10377,7 @@ static int __aic7xxx_bus_device_reset(struct scsi_cmnd *cmd)
 
   hscb = scb->hscb;
 
-  aic7xxx_isr(p->irq, (void *)p);
+  aic7xxx_isr(p);
   aic7xxx_done_cmds_complete(p);
   /* If the command was already complete or just completed, then we didn't
    * do a reset, return FAILED */
@@ -10608,7 +10608,7 @@ static int __aic7xxx_abort(struct scsi_cmnd *cmd)
   else
     return FAILED;
 
-  aic7xxx_isr(p->irq, (void *)p);
+  aic7xxx_isr(p);
   aic7xxx_done_cmds_complete(p);
   /* If the command was already complete or just completed, then we didn't
    * do a reset, return FAILED */
@@ -10863,7 +10863,7 @@ static int aic7xxx_reset(struct scsi_cmnd *cmd)
 
   while((aic_inb(p, INTSTAT) & INT_PEND) && !(p->flags & AHC_IN_ISR))
   {
-    aic7xxx_isr(p->irq, p);
+    aic7xxx_isr(p);
     pause_sequencer(p);
   }
   aic7xxx_done_cmds_complete(p);
index 81e3ee5..23f5e41 100644 (file)
@@ -1815,7 +1815,7 @@ static void dc395x_handle_interrupt(struct AdapterCtlBlk *acb,
 
 static irqreturn_t dc395x_interrupt(int irq, void *dev_id)
 {
-       struct AdapterCtlBlk *acb = (struct AdapterCtlBlk *)dev_id;
+       struct AdapterCtlBlk *acb = dev_id;
        u16 scsi_status;
        u8 dma_status;
        irqreturn_t handled = IRQ_NONE;
index 1a7de3b..e072535 100644 (file)
@@ -405,10 +405,10 @@ static unsigned int ql_pcmd(Scsi_Cmnd * cmd)
  *     Interrupt handler 
  */
 
-static void ql_ihandl(int irq, void *dev_id)
+static void ql_ihandl(void *dev_id)
 {
        Scsi_Cmnd *icmd;
-       struct Scsi_Host *host = (struct Scsi_Host *)dev_id;
+       struct Scsi_Host *host = dev_id;
        struct qlogicfas408_priv *priv = get_priv_by_host(host);
        int qbase = priv->qbase;
        REG0;
@@ -438,7 +438,7 @@ irqreturn_t qlogicfas408_ihandl(int irq, void *dev_id)
        struct Scsi_Host *host = dev_id;
 
        spin_lock_irqsave(host->host_lock, flags);
-       ql_ihandl(irq, dev_id);
+       ql_ihandl(dev_id);
        spin_unlock_irqrestore(host->host_lock, flags);
        return IRQ_HANDLED;
 }
index 0f0ac92..d03aa6c 100644 (file)
@@ -700,9 +700,9 @@ dc390_InvalidCmd(struct dc390_acb* pACB)
 
 
 static irqreturn_t __inline__
-DC390_Interrupt(int irq, void *dev_id)
+DC390_Interrupt(void *dev_id)
 {
-    struct dc390_acb *pACB = (struct dc390_acb*)dev_id;
+    struct dc390_acb *pACB = dev_id;
     struct dc390_dcb *pDCB;
     struct dc390_srb *pSRB;
     u8  sstatus=0;
@@ -811,12 +811,12 @@ DC390_Interrupt(int irq, void *dev_id)
     return IRQ_HANDLED;
 }
 
-static irqreturn_t do_DC390_Interrupt( int irq, void *dev_id)
+static irqreturn_t do_DC390_Interrupt(int irq, void *dev_id)
 {
     irqreturn_t ret;
     DEBUG1(printk (KERN_INFO "DC390: Irq (%i) caught: ", irq));
     /* Locking is done in DC390_Interrupt */
-    ret = DC390_Interrupt(irq, dev_id);
+    ret = DC390_Interrupt(dev_id);
     DEBUG1(printk (".. IRQ returned\n"));
     return ret;
 }
index 107f0fc..56906ab 100644 (file)
@@ -287,7 +287,7 @@ static const unsigned short ultrastor_ports_14f[] = {
 };
 #endif
 
-static void ultrastor_interrupt(int, void *);
+static void ultrastor_interrupt(void *);
 static irqreturn_t do_ultrastor_interrupt(int, void *);
 static inline void build_sg_list(struct mscp *, struct scsi_cmnd *SCpnt);
 
@@ -893,7 +893,7 @@ static int ultrastor_abort(struct scsi_cmnd *SCpnt)
        
        spin_lock_irqsave(host->host_lock, flags);
        /* FIXME: Ewww... need to think about passing host around properly */
-       ultrastor_interrupt(0, NULL);
+       ultrastor_interrupt(NULL);
        spin_unlock_irqrestore(host->host_lock, flags);
        return SUCCESS;
       }
@@ -1039,7 +1039,7 @@ int ultrastor_biosparam(struct scsi_device *sdev, struct block_device *bdev,
     return 0;
 }
 
-static void ultrastor_interrupt(int irq, void *dev_id)
+static void ultrastor_interrupt(void *dev_id)
 {
     unsigned int status;
 #if ULTRASTOR_MAX_CMDS > 1
@@ -1177,7 +1177,7 @@ static irqreturn_t do_ultrastor_interrupt(int irq, void *dev_id)
     struct Scsi_Host *dev = dev_id;
     
     spin_lock_irqsave(dev->host_lock, flags);
-    ultrastor_interrupt(irq, dev_id);
+    ultrastor_interrupt(dev_id);
     spin_unlock_irqrestore(dev->host_lock, flags);
     return IRQ_HANDLED;
 }
index 4e56ec8..634ecca 100644 (file)
@@ -620,7 +620,7 @@ static void rs_360_interrupt(int vec, void *dev_id)
        volatile struct smc_regs *smcp;
        volatile struct scc_regs *sccp;
        
-       info = (ser_info_t *)dev_id;
+       info = dev_id;
 
        idx = PORT_NUM(info->state->smc_scc_num);
        if (info->state->smc_scc_num & NUM_IS_SCC) {
index 8fa31e6..8be8da3 100644 (file)
@@ -1116,7 +1116,7 @@ static void neo_param(struct jsm_channel *ch)
  */
 static irqreturn_t neo_intr(int irq, void *voidbrd)
 {
-       struct jsm_board *brd = (struct jsm_board *) voidbrd;
+       struct jsm_board *brd = voidbrd;
        struct jsm_channel *ch;
        int port = 0;
        int type = 0;
index 039c2fd..4f80c5b 100644 (file)
@@ -512,19 +512,11 @@ mpc52xx_uart_int_tx_chars(struct uart_port *port)
 static irqreturn_t 
 mpc52xx_uart_int(int irq, void *dev_id)
 {
-       struct uart_port *port = (struct uart_port *) dev_id;
+       struct uart_port *port = dev_id;
        unsigned long pass = ISR_PASS_LIMIT;
        unsigned int keepgoing;
        unsigned short status;
        
-       if ( irq != port->irq ) {
-               printk( KERN_WARNING
-                       "mpc52xx_uart_int : " \
-                       "Received wrong int %d. Waiting for %d\n",
-                      irq, port->irq);
-               return IRQ_NONE;
-       }
-       
        spin_lock(&port->lock);
        
        /* While we have stuff to do, we continue */
index e92d7e1..062bad4 100644 (file)
@@ -247,7 +247,7 @@ static void netx_rxint(struct uart_port *port)
 
 static irqreturn_t netx_int(int irq, void *dev_id)
 {
-       struct uart_port *port = (struct uart_port *)dev_id;
+       struct uart_port *port = dev_id;
        unsigned long flags;
        unsigned char status;
 
index 846089f..415fe96 100644 (file)
@@ -232,7 +232,7 @@ static inline void check_modem_status(struct uart_pxa_port *up)
  */
 static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id)
 {
-       struct uart_pxa_port *up = (struct uart_pxa_port *)dev_id;
+       struct uart_pxa_port *up = dev_id;
        unsigned int iir, lsr;
 
        iir = serial_in(up, UART_IIR);
index 3d91b6b..cd6b653 100644 (file)
@@ -401,7 +401,7 @@ static inline uint32_t get_pending_intrs(struct ioc3_driver_data *idd)
 static irqreturn_t ioc3_intr_io(int irq, void *arg)
 {
        unsigned long flags;
-       struct ioc3_driver_data *idd = (struct ioc3_driver_data *)arg;
+       struct ioc3_driver_data *idd = arg;
        int handled = 1, id;
        unsigned int pending;
 
index 77122ed..72025df 100644 (file)
@@ -669,7 +669,7 @@ static irqreturn_t interrupt_transfer(struct driver_data *drv_data)
 
 static irqreturn_t ssp_int(int irq, void *dev_id)
 {
-       struct driver_data *drv_data = (struct driver_data *)dev_id;
+       struct driver_data *drv_data = dev_id;
        void *reg = drv_data->ioaddr;
 
        if (!drv_data->cur_msg) {
index 2306d49..021be39 100644 (file)
@@ -1087,7 +1087,7 @@ static int mos7840_open(struct usb_serial_port *port, struct file *filp)
        mos7840_port->icount.tx = 0;
        mos7840_port->icount.rx = 0;
 
-       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);
+       dbg("\n\nusb_serial serial:%p       mos7840_port:%p\n      usb_serial_port port:%p\n\n", serial, mos7840_port, port);
 
        return 0;
 
@@ -1420,7 +1420,6 @@ static int mos7840_write(struct usb_serial_port *port,
        int i;
        int bytes_sent = 0;
        int transfer_size;
-       int from_user = 0;
 
        struct moschip_port *mos7840_port;
        struct usb_serial *serial;
@@ -1511,15 +1510,7 @@ static int mos7840_write(struct usb_serial_port *port,
        }
        transfer_size = min(count, URB_TRANSFER_BUFFER_SIZE);
 
-       if (from_user) {
-               if (copy_from_user
-                   (urb->transfer_buffer, current_position, transfer_size)) {
-                       bytes_sent = -EFAULT;
-                       goto exit;
-               }
-       } else {
-               memcpy(urb->transfer_buffer, current_position, transfer_size);
-       }
+       memcpy(urb->transfer_buffer, current_position, transfer_size);
 
        /* fill urb with data and submit  */
        usb_fill_bulk_urb(urb,
@@ -2225,7 +2216,7 @@ static void mos7840_set_termios(struct usb_serial_port *port,
  *****************************************************************************/
 
 static int mos7840_get_lsr_info(struct moschip_port *mos7840_port,
-                               unsigned int *value)
+                               unsigned int __user *value)
 {
        int count;
        unsigned int result = 0;
@@ -2248,7 +2239,7 @@ static int mos7840_get_lsr_info(struct moschip_port *mos7840_port,
  *****************************************************************************/
 
 static int mos7840_get_bytes_avail(struct moschip_port *mos7840_port,
-                                  unsigned int *value)
+                                  unsigned int __user *value)
 {
        unsigned int result = 0;
        struct tty_struct *tty = mos7840_port->port->tty;
@@ -2271,7 +2262,7 @@ static int mos7840_get_bytes_avail(struct moschip_port *mos7840_port,
  *****************************************************************************/
 
 static int mos7840_set_modem_info(struct moschip_port *mos7840_port,
-                                 unsigned int cmd, unsigned int *value)
+                                 unsigned int cmd, unsigned int __user *value)
 {
        unsigned int mcr;
        unsigned int arg;
@@ -2341,7 +2332,7 @@ static int mos7840_set_modem_info(struct moschip_port *mos7840_port,
  *****************************************************************************/
 
 static int mos7840_get_modem_info(struct moschip_port *mos7840_port,
-                                 unsigned int *value)
+                                 unsigned int __user *value)
 {
        unsigned int result = 0;
        __u16 msr;
@@ -2370,7 +2361,7 @@ static int mos7840_get_modem_info(struct moschip_port *mos7840_port,
  *****************************************************************************/
 
 static int mos7840_get_serial_info(struct moschip_port *mos7840_port,
-                                  struct serial_struct *retinfo)
+                                  struct serial_struct __user *retinfo)
 {
        struct serial_struct tmp;
 
@@ -2405,6 +2396,7 @@ static int mos7840_get_serial_info(struct moschip_port *mos7840_port,
 static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
                         unsigned int cmd, unsigned long arg)
 {
+       void __user *argp = (void __user *)arg;
        struct moschip_port *mos7840_port;
        struct tty_struct *tty;
 
@@ -2433,16 +2425,13 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
 
        case TIOCINQ:
                dbg("%s (%d) TIOCINQ", __FUNCTION__, port->number);
-               return mos7840_get_bytes_avail(mos7840_port,
-                                              (unsigned int *)arg);
-               break;
+               return mos7840_get_bytes_avail(mos7840_port, argp);
 
        case TIOCOUTQ:
                dbg("%s (%d) TIOCOUTQ", __FUNCTION__, port->number);
                return put_user(tty->driver->chars_in_buffer ?
                                tty->driver->chars_in_buffer(tty) : 0,
                                (int __user *)arg);
-               break;
 
        case TCFLSH:
                retval = tty_check_change(tty);
@@ -2472,13 +2461,13 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
 
        case TCGETS:
                if (kernel_termios_to_user_termios
-                   ((struct termios __user *)arg, tty->termios))
+                   ((struct termios __user *)argp, tty->termios))
                        return -EFAULT;
                return 0;
 
        case TIOCSERGETLSR:
                dbg("%s (%d) TIOCSERGETLSR", __FUNCTION__, port->number);
-               return mos7840_get_lsr_info(mos7840_port, (unsigned int *)arg);
+               return mos7840_get_lsr_info(mos7840_port, argp);
                return 0;
 
        case TIOCMBIS:
@@ -2487,19 +2476,16 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
                dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__,
                    port->number);
                mosret =
-                   mos7840_set_modem_info(mos7840_port, cmd,
-                                          (unsigned int *)arg);
+                   mos7840_set_modem_info(mos7840_port, cmd, argp);
                return mosret;
 
        case TIOCMGET:
                dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number);
-               return mos7840_get_modem_info(mos7840_port,
-                                             (unsigned int *)arg);
+               return mos7840_get_modem_info(mos7840_port, argp);
 
        case TIOCGSERIAL:
                dbg("%s (%d) TIOCGSERIAL", __FUNCTION__, port->number);
-               return mos7840_get_serial_info(mos7840_port,
-                                              (struct serial_struct *)arg);
+               return mos7840_get_serial_info(mos7840_port, argp);
 
        case TIOCSSERIAL:
                dbg("%s (%d) TIOCSSERIAL", __FUNCTION__, port->number);
@@ -2549,7 +2535,7 @@ static int mos7840_ioctl(struct usb_serial_port *port, struct file *file,
 
                dbg("%s (%d) TIOCGICOUNT RX=%d, TX=%d", __FUNCTION__,
                    port->number, icount.rx, icount.tx);
-               if (copy_to_user((void *)arg, &icount, sizeof(icount)))
+               if (copy_to_user(argp, &icount, sizeof(icount)))
                        return -EFAULT;
                return 0;
 
@@ -2817,7 +2803,7 @@ static int mos7840_startup(struct usb_serial *serial)
 
        /* setting configuration feature to one */
        usb_control_msg(serial->dev, usb_sndctrlpipe(serial->dev, 0),
-                       (__u8) 0x03, 0x00, 0x01, 0x00, 0x00, 0x00, 5 * HZ);
+                       (__u8) 0x03, 0x00, 0x01, 0x00, NULL, 0x00, 5 * HZ);
        return 0;
 }
 
index 23f5ce1..7bcea7c 100644 (file)
@@ -174,7 +174,7 @@ static int nodeid_to_addr(int nodeid, struct sockaddr *retaddr)
        return 0;
 }
 
-static struct nodeinfo *nodeid2nodeinfo(int nodeid, int alloc)
+static struct nodeinfo *nodeid2nodeinfo(int nodeid, gfp_t alloc)
 {
        struct nodeinfo *ni;
        int r;
@@ -726,7 +726,7 @@ static int init_sock(void)
 }
 
 
-static struct writequeue_entry *new_writequeue_entry(int allocation)
+static struct writequeue_entry *new_writequeue_entry(gfp_t allocation)
 {
        struct writequeue_entry *entry;
 
@@ -748,7 +748,7 @@ static struct writequeue_entry *new_writequeue_entry(int allocation)
        return entry;
 }
 
-void *dlm_lowcomms_get_buffer(int nodeid, int len, int allocation, char **ppc)
+void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc)
 {
        struct writequeue_entry *e;
        int offset = 0;
index 6c04bb0..2d045e0 100644 (file)
@@ -19,7 +19,7 @@ void dlm_lowcomms_exit(void);
 int dlm_lowcomms_start(void);
 void dlm_lowcomms_stop(void);
 int dlm_lowcomms_close(int nodeid);
-void *dlm_lowcomms_get_buffer(int nodeid, int len, int allocation, char **ppc);
+void *dlm_lowcomms_get_buffer(int nodeid, int len, gfp_t allocation, char **ppc);
 void dlm_lowcomms_commit_buffer(void *mh);
 
 #endif                         /* __LOWCOMMS_DOT_H__ */
index dcb6d2e..642675f 100644 (file)
@@ -572,7 +572,7 @@ struct hppfs_dirent {
 };
 
 static int hppfs_filldir(void *d, const char *name, int size,
-                        loff_t offset, ino_t inode, unsigned int type)
+                        loff_t offset, u64 inode, unsigned int type)
 {
        struct hppfs_dirent *dirent = d;
 
index a89ac84..589d1ea 100644 (file)
@@ -726,7 +726,7 @@ outrel:
                                struct compat_ncp_privatedata_ioctl user32;
                                user32.len = user.len;
                                user32.data = (unsigned long) user.data;
-                               if (copy_to_user(&user32, argp, sizeof(user32)))
+                               if (copy_to_user(argp, &user32, sizeof(user32)))
                                        return -EFAULT;
                        } else
 #endif
index c32f15b..3956351 100644 (file)
@@ -135,6 +135,26 @@ vfs_getxattr(struct dentry *dentry, char *name, void *value, size_t size)
 }
 EXPORT_SYMBOL_GPL(vfs_getxattr);
 
+ssize_t
+vfs_listxattr(struct dentry *d, char *list, size_t size)
+{
+       ssize_t error;
+
+       error = security_inode_listxattr(d);
+       if (error)
+               return error;
+       error = -EOPNOTSUPP;
+       if (d->d_inode->i_op && d->d_inode->i_op->listxattr) {
+               error = d->d_inode->i_op->listxattr(d, list, size);
+       } else {
+               error = security_inode_listsecurity(d->d_inode, list, size);
+               if (size && error > size)
+                       error = -ERANGE;
+       }
+       return error;
+}
+EXPORT_SYMBOL_GPL(vfs_listxattr);
+
 int
 vfs_removexattr(struct dentry *dentry, char *name)
 {
@@ -346,17 +366,7 @@ listxattr(struct dentry *d, char __user *list, size_t size)
                        return -ENOMEM;
        }
 
-       error = security_inode_listxattr(d);
-       if (error)
-               goto out;
-       error = -EOPNOTSUPP;
-       if (d->d_inode->i_op && d->d_inode->i_op->listxattr) {
-               error = d->d_inode->i_op->listxattr(d, klist, size);
-       } else {
-               error = security_inode_listsecurity(d->d_inode, klist, size);
-               if (size && error > size)
-                       error = -ERANGE;
-       }
+       error = vfs_listxattr(d, klist, size);
        if (error > 0) {
                if (size && copy_to_user(list, klist, error))
                        error = -EFAULT;
@@ -365,7 +375,6 @@ listxattr(struct dentry *d, char __user *list, size_t size)
                   than XATTR_LIST_MAX bytes. Not possible. */
                error = -E2BIG;
        }
-out:
        kfree(klist);
        return error;
 }
index cda8a96..0e7f1e2 100644 (file)
@@ -41,6 +41,7 @@ struct xattr_handler {
 };
 
 ssize_t vfs_getxattr(struct dentry *, char *, void *, size_t);
+ssize_t vfs_listxattr(struct dentry *d, char *list, size_t size);
 int vfs_setxattr(struct dentry *, char *, void *, size_t, int);
 int vfs_removexattr(struct dentry *, char *);
 
index 52498c9..c1c69e3 100644 (file)
@@ -107,7 +107,7 @@ static int __init snd_gusmax_detect(struct snd_gus_card * gus)
 
 static irqreturn_t snd_gusmax_interrupt(int irq, void *dev_id)
 {
-       struct snd_gusmax *maxcard = (struct snd_gusmax *) dev_id;
+       struct snd_gusmax *maxcard = dev_id;
        int loop, max = 5;
        int handled = 0;
 
index 5c474b8..f12cd09 100644 (file)
@@ -301,7 +301,7 @@ static int __devinit snd_interwave_detect(struct snd_interwave *iwcard,
 
 static irqreturn_t snd_interwave_interrupt(int irq, void *dev_id)
 {
-       struct snd_interwave *iwcard = (struct snd_interwave *) dev_id;
+       struct snd_interwave *iwcard = dev_id;
        int loop, max = 5;
        int handled = 0;
 
index 2562f47..ddf6b0a 100644 (file)
@@ -1102,7 +1102,7 @@ static void es1371_handle_midi(struct es1371_state *s)
 
 static irqreturn_t es1371_interrupt(int irq, void *dev_id)
 {
-        struct es1371_state *s = (struct es1371_state *)dev_id;
+        struct es1371_state *s = dev_id;
        unsigned int intsrc, sctl;
        
        /* fastpath out, to ease interrupt sharing */
index 7807aba..784bdd7 100644 (file)
@@ -372,7 +372,7 @@ static void hal2_adc_interrupt(struct hal2_codec *adc)
 
 static irqreturn_t hal2_interrupt(int irq, void *dev_id)
 {
-       struct hal2_card *hal2 = (struct hal2_card*)dev_id;
+       struct hal2_card *hal2 = dev_id;
        irqreturn_t ret = IRQ_NONE;
 
        /* decide what caused this interrupt */
index a48af87..240cc79 100644 (file)
@@ -1525,7 +1525,7 @@ static void i810_channel_interrupt(struct i810_card *card)
 
 static irqreturn_t i810_interrupt(int irq, void *dev_id)
 {
-       struct i810_card *card = (struct i810_card *)dev_id;
+       struct i810_card *card = dev_id;
        u32 status;
 
        spin_lock(&card->lock);
index 58d4a5d..e962205 100644 (file)
@@ -435,7 +435,7 @@ static void mpu401_input_loop(struct mpu_config *devc)
 static irqreturn_t mpuintr(int irq, void *dev_id)
 {
        struct mpu_config *devc;
-       int dev = (int) dev_id;
+       int dev = (int)(unsigned long) dev_id;
        int handled = 0;
 
        devc = &dev_conf[dev];
index 0cd4d6e..6dfb9f4 100644 (file)
@@ -2235,7 +2235,7 @@ static void vwsnd_audio_write_intr(vwsnd_dev_t *devc, unsigned int status)
 
 static irqreturn_t vwsnd_audio_intr(int irq, void *dev_id)
 {
-       vwsnd_dev_t *devc = (vwsnd_dev_t *) dev_id;
+       vwsnd_dev_t *devc = dev_id;
        unsigned int status;
 
        DBGEV("(irq=%d, dev_id=0x%p)\n", irq, dev_id);
index 398aa10..fa8cd8c 100644 (file)
@@ -1124,9 +1124,6 @@ static irqreturn_t snd_korg1212_interrupt(int irq, void *dev_id)
         u32 doorbellValue;
         struct snd_korg1212 *korg1212 = dev_id;
 
-       if(irq != korg1212->irq)
-               return IRQ_NONE;
-
         doorbellValue = readl(korg1212->inDoorbellPtr);
 
         if (!doorbellValue)
@@ -1140,7 +1137,6 @@ static irqreturn_t snd_korg1212_interrupt(int irq, void *dev_id)
 
        korg1212->inIRQ++;
 
-
         switch (doorbellValue) {
                 case K1212_DB_DSPDownloadDone:
                         K1212_DEBUG_PRINTK("K1212_DEBUG: IRQ DNLD count - %ld, %x, [%s].\n",