NFS: Don't fail an O_DIRECT read/write if get_user_pages() returns pages
[linux-2.6-block.git] / drivers / scsi / aic7xxx_old.c
index 3eae8062a02ec56b511d944ebfecfbad71b5868a..a988d5abf7022eb8b8bac46785798ffedf3eff1a 100644 (file)
 #include <linux/kernel.h>
 #include <linux/ioport.h>
 #include <linux/delay.h>
-#include <linux/sched.h>
 #include <linux/pci.h>
 #include <linux/proc_fs.h>
 #include <linux/blkdev.h>
@@ -2565,7 +2564,7 @@ aic7xxx_allocate_scb(struct aic7xxx_host *p)
       }
     }
     scb_count = min( (i-1), p->scb_data->maxscbs - p->scb_data->numscbs);
-    scb_ap = (struct aic7xxx_scb *)kmalloc(sizeof (struct aic7xxx_scb) * scb_count
+    scb_ap = kmalloc(sizeof (struct aic7xxx_scb) * scb_count
                                           + sizeof(struct aic7xxx_scb_dma), GFP_ATOMIC);
     if (scb_ap == NULL)
       return(0);
@@ -2646,7 +2645,7 @@ static void aic7xxx_done_cmds_complete(struct aic7xxx_host *p)
 
        while (p->completeq.head != NULL) {
                cmd = p->completeq.head;
-               p->completeq.head = (struct scsi_Cmnd *) cmd->host_scribble;
+               p->completeq.head = (struct scsi_cmnd *) cmd->host_scribble;
                cmd->host_scribble = NULL;
                cmd->scsi_done(cmd);
        }
@@ -6345,12 +6344,12 @@ aic7xxx_handle_command_completion_intr(struct aic7xxx_host *p)
  *   SCSI controller interrupt handler.
  *-F*************************************************************************/
 static void
-aic7xxx_isr(int irq, void *dev_id, struct pt_regs *regs)
+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.
@@ -6477,7 +6476,7 @@ aic7xxx_isr(int irq, void *dev_id, struct pt_regs *regs)
  *   anything like it, please inform the Gross Hack Police immediately
  *-F*************************************************************************/
 static irqreturn_t
-do_aic7xxx_isr(int irq, void *dev_id, struct pt_regs *regs)
+do_aic7xxx_isr(int irq, void *dev_id)
 {
   unsigned long cpu_flags;
   struct aic7xxx_host *p;
@@ -6489,7 +6488,7 @@ do_aic7xxx_isr(int irq, void *dev_id, struct pt_regs *regs)
   p->flags |= AHC_IN_ISR;
   do
   {
-    aic7xxx_isr(irq, dev_id, regs);
+    aic7xxx_isr(dev_id);
   } while ( (aic_inb(p, INTSTAT) & INT_PEND) );
   aic7xxx_done_cmds_complete(p);
   aic7xxx_run_waiting_queues(p);
@@ -10377,7 +10376,7 @@ static int __aic7xxx_bus_device_reset(struct scsi_cmnd *cmd)
 
   hscb = scb->hscb;
 
-  aic7xxx_isr(p->irq, (void *)p, NULL);
+  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 +10607,7 @@ static int __aic7xxx_abort(struct scsi_cmnd *cmd)
   else
     return FAILED;
 
-  aic7xxx_isr(p->irq, (void *)p, NULL);
+  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 +10862,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, (void *)NULL );
+    aic7xxx_isr(p);
     pause_sequencer(p);
   }
   aic7xxx_done_cmds_complete(p);