[SCSI] be2iscsi:moved pci_set_drvdata to inside beiscsi_hba_alloc
authorJayamohan Kallickal <jayamohank@serverengines.com>
Mon, 4 Jan 2010 23:37:49 +0000 (05:07 +0530)
committerJames Bottomley <James.Bottomley@suse.de>
Mon, 18 Jan 2010 16:48:20 +0000 (10:48 -0600)
This patch moves pci_set_drvdata to inside beiscsi_hba_alloc

Signed-off-by: Jayamohan Kallickal <jayamohank@serverengines.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/be2iscsi/be_main.c

index 4a855a9c7126a0f711039928d464f316ae5f26e8..18471ede7f805078f6a41488d6717b8e3750d3f0 100644 (file)
@@ -112,6 +112,7 @@ static struct beiscsi_hba *beiscsi_hba_alloc(struct pci_dev *pcidev)
        memset(phba, 0, sizeof(*phba));
        phba->shost = shost;
        phba->pcidev = pci_dev_get(pcidev);
+       pci_set_drvdata(pcidev, phba);
 
        if (iscsi_host_add(shost, &phba->pcidev->dev))
                goto free_devices;
@@ -3734,7 +3735,6 @@ static int __devinit beiscsi_dev_probe(struct pci_dev *pcidev,
        }
        SE_DEBUG(DBG_LVL_8, " phba = %p \n", phba);
 
-       pci_set_drvdata(pcidev, phba);
        if (enable_msix)
                num_cpus = find_num_cpus();
        else