Merge Christoph's freeze cleanup patch
[powerpc.git] / drivers / scsi / NCR53C9x.c
index 3c86655..6ceabbd 100644 (file)
@@ -94,7 +94,7 @@ enum {
 };
 
 /* The master ring of all esp hosts we are managing in this driver. */
-struct NCR_ESP *espchain;
+static struct NCR_ESP *espchain;
 int nesps = 0, esps_in_use = 0, esps_running = 0;
 
 irqreturn_t esp_intr(int irq, void *dev_id, struct pt_regs *pregs);
@@ -1467,14 +1467,12 @@ int esp_reset(Scsi_Cmnd *SCptr)
 {
        struct NCR_ESP *esp = (struct NCR_ESP *) SCptr->device->host->hostdata;
 
+       spin_lock_irq(esp->ehost->host_lock);
        (void) esp_do_resetbus(esp, esp->eregs);
-
        spin_unlock_irq(esp->ehost->host_lock);
 
        wait_event(esp->reset_queue, (esp->resetting_bus == 0));
 
-       spin_lock_irq(esp->ehost->host_lock);
-
        return SUCCESS;
 }
 
@@ -1824,7 +1822,10 @@ static int esp_do_data(struct NCR_ESP *esp, struct ESP_regs *eregs)
                /* loop */
                while (hmuch) {
                        int j, fifo_stuck = 0, newphase;
-                       unsigned long flags, timeout;
+                       unsigned long timeout;
+#if 0
+                       unsigned long flags;
+#endif
 #if 0
                        if ( i % 10 )
                                ESPDATA(("\r"));