diff --git a/drivers/scsi/dpt_i2o.c b/drivers/scsi/dpt_i2o.c --- a/drivers/scsi/dpt_i2o.c +++ b/drivers/scsi/dpt_i2o.c @@ -183,7 +183,7 @@ static int adpt_detect(struct scsi_host_ PINFO("Detecting Adaptec I2O RAID controllers...\n"); /* search for all Adatpec I2O RAID cards */ - while ((pDev = pci_find_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) { + while ((pDev = pci_get_device( PCI_DPT_VENDOR_ID, PCI_ANY_ID, pDev))) { if(pDev->device == PCI_DPT_DEVICE_ID || pDev->device == PCI_DPT_RAPTOR_DEVICE_ID){ if(adpt_install_hba(sht, pDev) ){ @@ -967,7 +967,7 @@ static int adpt_install_hba(struct scsi_ pHba->status_block = NULL; pHba->post_count = 0; pHba->state = DPTI_STATE_RESET; - pHba->pDev = pDev; +// pHba->pDev = pDev; // this is a few line above this pHba->devices = NULL; // Initializing the spinlocks @@ -1057,6 +1057,7 @@ static void adpt_i2o_delete_hba(adpt_hba } } } + pci_dev_put(pHba->pDev); kfree(pHba); if(hba_count <= 0){