aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/dpt_i2o.c
diff options
context:
space:
mode:
authorAlan Cox <alan@lxorguk.ukuu.org.uk>2006-09-15 10:34:32 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2006-09-23 21:32:52 -0400
commita07f353701acae77e023f6270e8af353b37af7c4 (patch)
tree150bb61c6eb1891afaaa79047a399e3e66f561a2 /drivers/scsi/dpt_i2o.c
parent1a68d41a334a406d4bd35999f0be4d47f193e477 (diff)
[SCSI] Switch some more scsi drivers to pci_get_device and refcounted pci structures
Signed-off-by: Alan Cox <alan@redhat.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r--drivers/scsi/dpt_i2o.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c
index 45806336ce02..7b3bd34faf47 100644
--- a/drivers/scsi/dpt_i2o.c
+++ b/drivers/scsi/dpt_i2o.c
@@ -184,7 +184,7 @@ static int adpt_detect(struct scsi_host_template* sht)
184 PINFO("Detecting Adaptec I2O RAID controllers...\n"); 184 PINFO("Detecting Adaptec I2O RAID controllers...\n");
185 185
186 /* search for all Adatpec I2O RAID cards */ 186 /* search for all Adatpec I2O RAID cards */
187 while ((pDev = pci_find_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) { 187 while ((pDev = pci_get_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) {
188 if(pDev->device == PCI_DPT_DEVICE_ID || 188 if(pDev->device == PCI_DPT_DEVICE_ID ||
189 pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){ 189 pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){
190 if(adpt_install_hba(sht, pDev) ){ 190 if(adpt_install_hba(sht, pDev) ){
@@ -192,8 +192,11 @@ static int adpt_detect(struct scsi_host_template* sht)
192 PERROR("Will not try to detect others.\n"); 192 PERROR("Will not try to detect others.\n");
193 return hba_count-1; 193 return hba_count-1;
194 } 194 }
195 pci_dev_get(pDev);
195 } 196 }
196 } 197 }
198 if (pDev)
199 pci_dev_put(pDev);
197 200
198 /* In INIT state, Activate IOPs */ 201 /* In INIT state, Activate IOPs */
199 for (pHba = hba_chain; pHba; pHba = pHba->next) { 202 for (pHba = hba_chain; pHba; pHba = pHba->next) {
@@ -1075,6 +1078,7 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba)
1075 } 1078 }
1076 } 1079 }
1077 } 1080 }
1081 pci_dev_put(pHba->pDev);
1078 kfree(pHba); 1082 kfree(pHba);
1079 1083
1080 if(hba_count <= 0){ 1084 if(hba_count <= 0){