Merge branch 'master' into upstream-fixes
[sfrench/cifs-2.6.git] / drivers / scsi / NCR53c406a.c
index e1f2246ee7cda1ca97360e913b9982b599f496a3..3896278594c765c744bfa086eca292bfde75148d 100644 (file)
@@ -168,8 +168,8 @@ enum Phase {
 };
 
 /* Static function prototypes */
-static void NCR53c406a_intr(int, void *, struct pt_regs *);
-static irqreturn_t do_NCR53c406a_intr(int, void *, struct pt_regs *);
+static void NCR53c406a_intr(int, void *);
+static irqreturn_t do_NCR53c406a_intr(int, void *);
 static void chip_init(void);
 static void calc_port_addr(void);
 #ifndef IRQ_LEV
@@ -213,16 +213,16 @@ static void *addresses[] = {
        (void *) 0xd8000,
        (void *) 0xc8000
 };
-#define ADDRESS_COUNT (sizeof( addresses ) / sizeof( unsigned ))
+#define ADDRESS_COUNT ARRAY_SIZE(addresses)
 #endif                         /* USE_BIOS */
 
 /* possible i/o port addresses */
 static unsigned short ports[] = { 0x230, 0x330, 0x280, 0x290, 0x330, 0x340, 0x300, 0x310, 0x348, 0x350 };
-#define PORT_COUNT (sizeof( ports ) / sizeof( unsigned short ))
+#define PORT_COUNT ARRAY_SIZE(ports)
 
 /* possible interrupt channels */
 static unsigned short intrs[] = { 10, 11, 12, 15 };
-#define INTR_COUNT (sizeof( intrs ) / sizeof( unsigned short ))
+#define INTR_COUNT ARRAY_SIZE(intrs)
 
 /* signatures for NCR 53c406a based controllers */
 #if USE_BIOS
@@ -236,7 +236,7 @@ struct signature {
        {
 "Copyright (C) Acculogic, Inc.\r\n2.8M Diskette Extension Bios ver 4.04.03 03/01/1993", 61, 82},};
 
-#define SIGNATURE_COUNT (sizeof( signatures ) / sizeof( struct signature ))
+#define SIGNATURE_COUNT ARRAY_SIZE(signatures)
 #endif                         /* USE_BIOS */
 
 /* ============================================================ */
@@ -447,7 +447,7 @@ static __inline__ int NCR53c406a_pio_write(unsigned char *request, unsigned int
 }
 #endif                         /* USE_PIO */
 
-static int __init NCR53c406a_detect(Scsi_Host_Template * tpnt)
+static int __init NCR53c406a_detect(struct scsi_host_template * tpnt)
 {
        int present = 0;
        struct Scsi_Host *shpnt = NULL;
@@ -710,7 +710,7 @@ static int NCR53c406a_queue(Scsi_Cmnd * SCpnt, void (*done) (Scsi_Cmnd *))
 
        /* We are locked here already by the mid layer */
        REG0;
-       outb(SCpnt->device->id, DEST_ID);       /* set destination */
+       outb(scmd_id(SCpnt), DEST_ID);  /* set destination */
        outb(FLUSH_FIFO, CMD_REG);      /* reset the fifos */
 
        for (i = 0; i < SCpnt->cmd_len; i++) {
@@ -761,19 +761,18 @@ static int NCR53c406a_biosparm(struct scsi_device *disk,
        return 0;
 }
 
-static irqreturn_t do_NCR53c406a_intr(int unused, void *dev_id,
-                                       struct pt_regs *regs)
+static irqreturn_t do_NCR53c406a_intr(int unused, void *dev_id)
 {
        unsigned long flags;
        struct Scsi_Host *dev = dev_id;
 
        spin_lock_irqsave(dev->host_lock, flags);
-       NCR53c406a_intr(0, dev_id, regs);
+       NCR53c406a_intr(0, dev_id);
        spin_unlock_irqrestore(dev->host_lock, flags);
        return IRQ_HANDLED;
 }
 
-static void NCR53c406a_intr(int unused, void *dev_id, struct pt_regs *regs)
+static void NCR53c406a_intr(int unused, void *dev_id)
 {
        DEB(unsigned char fifo_size;
            )
@@ -1057,7 +1056,7 @@ MODULE_LICENSE("GPL");
  * Use SG_NONE if DMA mode is enabled!
  */
 
-static Scsi_Host_Template driver_template = 
+static struct scsi_host_template driver_template =
 {
      .proc_name                = "NCR53c406a"          /* proc_name */,        
      .name                     = "NCR53c406a"          /* name */,