vsprintf: reduce code size by avoiding extra check
[safe/jmp/linux-2.6] / drivers / scsi / mac_scsi.c
index 92d2c83..bf2a1c5 100644 (file)
@@ -36,7 +36,6 @@
 
 #include <linux/module.h>
 #include <linux/signal.h>
-#include <linux/sched.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
 #include <linux/blkdev.h>
 
 #include <asm/macintosh.h>
 #include <asm/macints.h>
-#include <asm/machw.h>
 #include <asm/mac_via.h>
 
 #include "scsi.h"
 #include <scsi/scsi_host.h>
 #include "mac_scsi.h"
+
+/* These control the behaviour of the generic 5380 core */
+#define AUTOSENSE
+#define PSEUDO_DMA
+
 #include "NCR5380.h"
 
 #if 0
@@ -65,9 +68,6 @@
 #define RESET_BOOT
 #define DRIVER_SETUP
 
-#define        ENABLE_IRQ()    mac_enable_irq( IRQ_MAC_SCSI ); 
-#define        DISABLE_IRQ()   mac_disable_irq( IRQ_MAC_SCSI );
-
 extern void via_scsi_clear(void);
 
 #ifdef RESET_BOOT
@@ -222,7 +222,7 @@ static struct Scsi_Host *default_instance;
 #endif
 
 /*
- * Function : int macscsi_detect(Scsi_Host_Template * tpnt)
+ * Function : int macscsi_detect(struct scsi_host_template * tpnt)
  *
  * Purpose : initializes mac NCR5380 driver based on the
  *     command line / compile time port and irq definitions.
@@ -233,7 +233,7 @@ static struct Scsi_Host *default_instance;
  *
  */
  
-int macscsi_detect(Scsi_Host_Template * tpnt)
+int macscsi_detect(struct scsi_host_template * tpnt)
 {
     static int called = 0;
     int flags = 0;
@@ -302,7 +302,7 @@ int macscsi_detect(Scsi_Host_Template * tpnt)
 
     if (instance->irq != SCSI_IRQ_NONE)
        if (request_irq(instance->irq, NCR5380_intr, IRQ_FLG_SLOW, 
-               "ncr5380", instance)) {
+                       "ncr5380", instance)) {
            printk(KERN_WARNING "scsi%d: IRQ%d not free, interrupts disabled\n",
                   instance->host_no, instance->irq);
            instance->irq = SCSI_IRQ_NONE;
@@ -325,7 +325,7 @@ int macscsi_detect(Scsi_Host_Template * tpnt)
 int macscsi_release (struct Scsi_Host *shpnt)
 {
        if (shpnt->irq != SCSI_IRQ_NONE)
-               free_irq (shpnt->irq, NCR5380_intr);
+               free_irq(shpnt->irq, shpnt);
        NCR5380_exit(shpnt);
 
        return 0;
@@ -351,7 +351,7 @@ static void mac_scsi_reset_boot(struct Scsi_Host *instance)
        printk(KERN_INFO "Macintosh SCSI: resetting the SCSI bus..." );
 
        /* switch off SCSI IRQ - catch an interrupt without IRQ bit set else */
-       mac_disable_irq(IRQ_MAC_SCSI);
+       disable_irq(IRQ_MAC_SCSI);
 
        /* get in phase */
        NCR5380_write( TARGET_COMMAND_REG,
@@ -369,7 +369,7 @@ static void mac_scsi_reset_boot(struct Scsi_Host *instance)
                barrier();
 
        /* switch on SCSI IRQ again */
-       mac_enable_irq(IRQ_MAC_SCSI);
+       enable_irq(IRQ_MAC_SCSI);
 
        printk(KERN_INFO " done\n" );
 }
@@ -575,13 +575,9 @@ static int macscsi_pwrite (struct Scsi_Host *instance,
 }
 
 
-/* These control the behaviour of the generic 5380 core */
-#define AUTOSENSE
-#define PSEUDO_DMA
-
 #include "NCR5380.c"
 
-static Scsi_Host_Template driver_template = {
+static struct scsi_host_template driver_template = {
        .proc_name                      = "Mac5380",
        .proc_info                      = macscsi_proc_info,
        .name                           = "Macintosh NCR5380 SCSI",
@@ -595,7 +591,6 @@ static Scsi_Host_Template driver_template = {
        .this_id                        = 7,
        .sg_tablesize                   = SG_ALL,
        .cmd_per_lun                    = CMD_PER_LUN,
-       .unchecked_isa_dma              = 0,
        .use_clustering                 = DISABLE_CLUSTERING
 };