Skip to content

Commit

Permalink
[SCSI] be2iscsi:moved pci_set_drvdata to inside beiscsi_hba_alloc
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jayamohan Kallickal authored and James Bottomley committed Jan 18, 2010
1 parent 7bd6e25 commit 2807afb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/be2iscsi/be_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 2807afb

Please sign in to comment.