]> err.no Git - linux-2.6/blobdiff - drivers/message/fusion/mptspi.c
[SCSI] mptfusion - adding = THIS_MODULE
[linux-2.6] / drivers / message / fusion / mptspi.c
index e0c0ee5bc9662386e73c79af9ceded98d9623a72..9431d386c72abbd6d5d848b7e5cbcbb622bb1fd5 100644 (file)
@@ -102,20 +102,8 @@ static int mptspiDoneCtx = -1;
 static int     mptspiTaskCtx = -1;
 static int     mptspiInternalCtx = -1; /* Used only for internal commands */
 
-static struct device_attribute mptspi_queue_depth_attr = {
-       .attr = {
-               .name =         "queue_depth",
-               .mode =         S_IWUSR,
-       },
-       .store = mptscsih_store_queue_depth,
-};
-
-static struct device_attribute *mptspi_dev_attrs[] = {
-       &mptspi_queue_depth_attr,
-       NULL,
-};
-
 static struct scsi_host_template mptspi_driver_template = {
+       .module                         = THIS_MODULE,
        .proc_name                      = "mptspi",
        .proc_info                      = mptscsih_proc_info,
        .name                           = "MPT SPI Host",
@@ -124,6 +112,7 @@ static struct scsi_host_template mptspi_driver_template = {
        .slave_alloc                    = mptscsih_slave_alloc,
        .slave_configure                = mptscsih_slave_configure,
        .slave_destroy                  = mptscsih_slave_destroy,
+       .change_queue_depth             = mptscsih_change_queue_depth,
        .eh_abort_handler               = mptscsih_abort,
        .eh_device_reset_handler        = mptscsih_dev_reset,
        .eh_bus_reset_handler           = mptscsih_bus_reset,
@@ -135,7 +124,6 @@ static struct scsi_host_template mptspi_driver_template = {
        .max_sectors                    = 8192,
        .cmd_per_lun                    = 7,
        .use_clustering                 = ENABLE_CLUSTERING,
-       .sdev_attrs                     = mptspi_dev_attrs,
 };
 
 
@@ -175,15 +163,15 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
        u8                      *mem;
        int                     error=0;
        int                     r;
-       
+
        if ((r = mpt_attach(pdev,id)) != 0)
                return r;
-       
+
        ioc = pci_get_drvdata(pdev);
        ioc->DoneCtx = mptspiDoneCtx;
        ioc->TaskCtx = mptspiTaskCtx;
        ioc->InternalCtx = mptspiInternalCtx;
-       
+
        /*  Added sanity check on readiness of the MPT adapter.
         */
        if (ioc->last_state != MPI_IOC_STATE_OPERATIONAL) {
@@ -212,7 +200,7 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                printk(MYIOC_s_WARN_FMT
                        "Skipping ioc=%p because SCSI Initiator mode is NOT enabled!\n",
                        ioc->name, ioc);
-               return -ENODEV;
+               return 0;
        }
 
        sh = scsi_host_alloc(&mptspi_driver_template, sizeof(MPT_SCSI_HOST));
@@ -287,10 +275,6 @@ mptspi_probe(struct pci_dev *pdev, const struct pci_device_id *id)
                sh->sg_tablesize = numSGE;
        }
 
-       /* Set the pci device pointer in Scsi_Host structure.
-        */
-       scsi_set_device(sh, &ioc->pcidev->dev);
-
        spin_unlock_irqrestore(&ioc->FreeQlock, flags);
 
        hd = (MPT_SCSI_HOST *) sh->hostdata;