diff options
Diffstat (limited to 'drivers/scsi/dpt_i2o.c')
-rw-r--r-- | drivers/scsi/dpt_i2o.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c index e1337339cacc..7b3bd34faf47 100644 --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c | |||
@@ -46,7 +46,6 @@ MODULE_DESCRIPTION("Adaptec I2O RAID Driver"); | |||
46 | 46 | ||
47 | #include <linux/stat.h> | 47 | #include <linux/stat.h> |
48 | #include <linux/slab.h> /* for kmalloc() */ | 48 | #include <linux/slab.h> /* for kmalloc() */ |
49 | #include <linux/config.h> /* for CONFIG_PCI */ | ||
50 | #include <linux/pci.h> /* for PCI support */ | 49 | #include <linux/pci.h> /* for PCI support */ |
51 | #include <linux/proc_fs.h> | 50 | #include <linux/proc_fs.h> |
52 | #include <linux/blkdev.h> | 51 | #include <linux/blkdev.h> |
@@ -185,7 +184,7 @@ static int adpt_detect(struct scsi_host_template* sht) | |||
185 | PINFO("Detecting Adaptec I2O RAID controllers...\n"); | 184 | PINFO("Detecting Adaptec I2O RAID controllers...\n"); |
186 | 185 | ||
187 | /* search for all Adatpec I2O RAID cards */ | 186 | /* search for all Adatpec I2O RAID cards */ |
188 | 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))) { |
189 | if(pDev->device == PCI_DPT_DEVICE_ID || | 188 | if(pDev->device == PCI_DPT_DEVICE_ID || |
190 | pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){ | 189 | pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){ |
191 | if(adpt_install_hba(sht, pDev) ){ | 190 | if(adpt_install_hba(sht, pDev) ){ |
@@ -193,8 +192,11 @@ static int adpt_detect(struct scsi_host_template* sht) | |||
193 | PERROR("Will not try to detect others.\n"); | 192 | PERROR("Will not try to detect others.\n"); |
194 | return hba_count-1; | 193 | return hba_count-1; |
195 | } | 194 | } |
195 | pci_dev_get(pDev); | ||
196 | } | 196 | } |
197 | } | 197 | } |
198 | if (pDev) | ||
199 | pci_dev_put(pDev); | ||
198 | 200 | ||
199 | /* In INIT state, Activate IOPs */ | 201 | /* In INIT state, Activate IOPs */ |
200 | for (pHba = hba_chain; pHba; pHba = pHba->next) { | 202 | for (pHba = hba_chain; pHba; pHba = pHba->next) { |
@@ -1076,6 +1078,7 @@ static void adpt_i2o_delete_hba(adpt_hba* pHba) | |||
1076 | } | 1078 | } |
1077 | } | 1079 | } |
1078 | } | 1080 | } |
1081 | pci_dev_put(pHba->pDev); | ||
1079 | kfree(pHba); | 1082 | kfree(pHba); |
1080 | 1083 | ||
1081 | if(hba_count <= 0){ | 1084 | if(hba_count <= 0){ |