]> err.no Git - linux-2.6/blobdiff - drivers/block/cciss.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
[linux-2.6] / drivers / block / cciss.c
index e4e9f255bd1f709a01a58dc5d09c2e8b10684820..e29b8926f80ed08e1c618e236c8186720f0f1ea9 100644 (file)
@@ -2137,7 +2137,7 @@ static void start_io( ctlr_info_t *h)
                        break;
                }
 
-               /* Get the frist entry from the Request Q */ 
+               /* Get the first entry from the Request Q */ 
                removeQ(&(h->reqQ), c);
                h->Qdepth--;
        
@@ -2183,6 +2183,7 @@ static void cciss_softirq_done(struct request *rq)
 {
        CommandList_struct *cmd = rq->completion_data;
        ctlr_info_t *h = hba[cmd->ctlr];
+       unsigned long flags;
        u64bit temp64;
        int i, ddir;
 
@@ -2205,10 +2206,10 @@ static void cciss_softirq_done(struct request *rq)
        printk("Done with %p\n", rq);
 #endif /* CCISS_DEBUG */ 
 
-       spin_lock_irq(&h->lock);
+       spin_lock_irqsave(&h->lock, flags);
        end_that_request_last(rq, rq->errors);
        cmd_free(h, cmd,1);
-       spin_unlock_irq(&h->lock);
+       spin_unlock_irqrestore(&h->lock, flags);
 }
 
 /* checks the status of the job and calls complete buffers to mark all 
@@ -3250,8 +3251,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
 
 clean4:
 #ifdef CONFIG_CISS_SCSI_TAPE
-       if(hba[i]->scsi_rejects.complete)
-               kfree(hba[i]->scsi_rejects.complete);
+       kfree(hba[i]->scsi_rejects.complete);
 #endif
        kfree(hba[i]->cmd_pool_bits);
        if(hba[i]->cmd_pool)
@@ -3268,8 +3268,8 @@ clean2:
        unregister_blkdev(hba[i]->major, hba[i]->devname);
 clean1:
        release_io_mem(hba[i]);
-       free_hba(i);
        hba[i]->busy_initializing = 0;
+       free_hba(i);
        return(-1);
 }
 
@@ -3360,7 +3360,7 @@ static int __init cciss_init(void)
        printk(KERN_INFO DRIVER_NAME "\n");
 
        /* Register for our PCI devices */
-       return pci_module_init(&cciss_pci_driver);
+       return pci_register_driver(&cciss_pci_driver);
 }
 
 static void __exit cciss_cleanup(void)