diff options
Diffstat (limited to 'drivers/scsi/BusLogic.c')
-rw-r--r-- | drivers/scsi/BusLogic.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index 59d1adaed73e..4ea49fd7965e 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c | |||
@@ -662,7 +662,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd | |||
662 | particular standard ISA I/O Address need not be probed. | 662 | particular standard ISA I/O Address need not be probed. |
663 | */ | 663 | */ |
664 | PrimaryProbeInfo->IO_Address = 0; | 664 | PrimaryProbeInfo->IO_Address = 0; |
665 | while ((PCI_Device = pci_find_device(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER, PCI_Device)) != NULL) { | 665 | while ((PCI_Device = pci_get_device(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER, PCI_Device)) != NULL) { |
666 | struct BusLogic_HostAdapter *HostAdapter = PrototypeHostAdapter; | 666 | struct BusLogic_HostAdapter *HostAdapter = PrototypeHostAdapter; |
667 | struct BusLogic_PCIHostAdapterInformation PCIHostAdapterInformation; | 667 | struct BusLogic_PCIHostAdapterInformation PCIHostAdapterInformation; |
668 | enum BusLogic_ISACompatibleIOPort ModifyIOAddressRequest; | 668 | enum BusLogic_ISACompatibleIOPort ModifyIOAddressRequest; |
@@ -762,7 +762,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd | |||
762 | PrimaryProbeInfo->Bus = Bus; | 762 | PrimaryProbeInfo->Bus = Bus; |
763 | PrimaryProbeInfo->Device = Device; | 763 | PrimaryProbeInfo->Device = Device; |
764 | PrimaryProbeInfo->IRQ_Channel = IRQ_Channel; | 764 | PrimaryProbeInfo->IRQ_Channel = IRQ_Channel; |
765 | PrimaryProbeInfo->PCI_Device = PCI_Device; | 765 | PrimaryProbeInfo->PCI_Device = pci_dev_get(PCI_Device); |
766 | PCIMultiMasterCount++; | 766 | PCIMultiMasterCount++; |
767 | } else if (BusLogic_ProbeInfoCount < BusLogic_MaxHostAdapters) { | 767 | } else if (BusLogic_ProbeInfoCount < BusLogic_MaxHostAdapters) { |
768 | struct BusLogic_ProbeInfo *ProbeInfo = &BusLogic_ProbeInfoList[BusLogic_ProbeInfoCount++]; | 768 | struct BusLogic_ProbeInfo *ProbeInfo = &BusLogic_ProbeInfoList[BusLogic_ProbeInfoCount++]; |
@@ -773,7 +773,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd | |||
773 | ProbeInfo->Bus = Bus; | 773 | ProbeInfo->Bus = Bus; |
774 | ProbeInfo->Device = Device; | 774 | ProbeInfo->Device = Device; |
775 | ProbeInfo->IRQ_Channel = IRQ_Channel; | 775 | ProbeInfo->IRQ_Channel = IRQ_Channel; |
776 | ProbeInfo->PCI_Device = PCI_Device; | 776 | ProbeInfo->PCI_Device = pci_dev_get(PCI_Device); |
777 | NonPrimaryPCIMultiMasterCount++; | 777 | NonPrimaryPCIMultiMasterCount++; |
778 | PCIMultiMasterCount++; | 778 | PCIMultiMasterCount++; |
779 | } else | 779 | } else |
@@ -823,7 +823,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd | |||
823 | noting the PCI bus location and assigned IRQ Channel. | 823 | noting the PCI bus location and assigned IRQ Channel. |
824 | */ | 824 | */ |
825 | PCI_Device = NULL; | 825 | PCI_Device = NULL; |
826 | while ((PCI_Device = pci_find_device(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC, PCI_Device)) != NULL) { | 826 | while ((PCI_Device = pci_get_device(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_MULTIMASTER_NC, PCI_Device)) != NULL) { |
827 | unsigned char Bus; | 827 | unsigned char Bus; |
828 | unsigned char Device; | 828 | unsigned char Device; |
829 | unsigned int IRQ_Channel; | 829 | unsigned int IRQ_Channel; |
@@ -850,7 +850,7 @@ static int __init BusLogic_InitializeMultiMasterProbeInfo(struct BusLogic_HostAd | |||
850 | ProbeInfo->Bus = Bus; | 850 | ProbeInfo->Bus = Bus; |
851 | ProbeInfo->Device = Device; | 851 | ProbeInfo->Device = Device; |
852 | ProbeInfo->IRQ_Channel = IRQ_Channel; | 852 | ProbeInfo->IRQ_Channel = IRQ_Channel; |
853 | ProbeInfo->PCI_Device = PCI_Device; | 853 | ProbeInfo->PCI_Device = pci_dev_get(PCI_Device); |
854 | break; | 854 | break; |
855 | } | 855 | } |
856 | } | 856 | } |
@@ -874,7 +874,7 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda | |||
874 | /* | 874 | /* |
875 | Interrogate PCI Configuration Space for any FlashPoint Host Adapters. | 875 | Interrogate PCI Configuration Space for any FlashPoint Host Adapters. |
876 | */ | 876 | */ |
877 | while ((PCI_Device = pci_find_device(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT, PCI_Device)) != NULL) { | 877 | while ((PCI_Device = pci_get_device(PCI_VENDOR_ID_BUSLOGIC, PCI_DEVICE_ID_BUSLOGIC_FLASHPOINT, PCI_Device)) != NULL) { |
878 | unsigned char Bus; | 878 | unsigned char Bus; |
879 | unsigned char Device; | 879 | unsigned char Device; |
880 | unsigned int IRQ_Channel; | 880 | unsigned int IRQ_Channel; |
@@ -923,7 +923,7 @@ static int __init BusLogic_InitializeFlashPointProbeInfo(struct BusLogic_HostAda | |||
923 | ProbeInfo->Bus = Bus; | 923 | ProbeInfo->Bus = Bus; |
924 | ProbeInfo->Device = Device; | 924 | ProbeInfo->Device = Device; |
925 | ProbeInfo->IRQ_Channel = IRQ_Channel; | 925 | ProbeInfo->IRQ_Channel = IRQ_Channel; |
926 | ProbeInfo->PCI_Device = PCI_Device; | 926 | ProbeInfo->PCI_Device = pci_dev_get(PCI_Device); |
927 | FlashPointCount++; | 927 | FlashPointCount++; |
928 | } else | 928 | } else |
929 | BusLogic_Warning("BusLogic: Too many Host Adapters " "detected\n", NULL); | 929 | BusLogic_Warning("BusLogic: Too many Host Adapters " "detected\n", NULL); |
@@ -1890,6 +1890,7 @@ static void BusLogic_ReleaseResources(struct BusLogic_HostAdapter *HostAdapter) | |||
1890 | */ | 1890 | */ |
1891 | if (HostAdapter->MailboxSpace) | 1891 | if (HostAdapter->MailboxSpace) |
1892 | pci_free_consistent(HostAdapter->PCI_Device, HostAdapter->MailboxSize, HostAdapter->MailboxSpace, HostAdapter->MailboxSpaceHandle); | 1892 | pci_free_consistent(HostAdapter->PCI_Device, HostAdapter->MailboxSize, HostAdapter->MailboxSpace, HostAdapter->MailboxSpaceHandle); |
1893 | pci_dev_put(HostAdapter->PCI_Device); | ||
1893 | HostAdapter->MailboxSpace = NULL; | 1894 | HostAdapter->MailboxSpace = NULL; |
1894 | HostAdapter->MailboxSpaceHandle = 0; | 1895 | HostAdapter->MailboxSpaceHandle = 0; |
1895 | HostAdapter->MailboxSize = 0; | 1896 | HostAdapter->MailboxSize = 0; |