summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2003-06-04 22:03:52 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2003-06-04 22:03:52 -0700
commitbf77023b9ec7340953c0fca55b98d003f86162aa (patch)
treedd155f43230b3429f1845b9dd452352bfd7fbc2e
parent0b6252bc0612e76b3b3b0e0c1dbf91d44cf34c1c (diff)
[PATCH] PCI: fix up previous fusion driver pci changes
This makes the driver build properly now, and removes a direct access of the pci_devices variable.
-rw-r--r--drivers/message/fusion/linux_compat.h7
-rw-r--r--drivers/message/fusion/mptbase.c2
2 files changed, 3 insertions, 6 deletions
diff --git a/drivers/message/fusion/linux_compat.h b/drivers/message/fusion/linux_compat.h
index 78dc037b377d..4ffb21ae1034 100644
--- a/drivers/message/fusion/linux_compat.h
+++ b/drivers/message/fusion/linux_compat.h
@@ -147,9 +147,7 @@ typedef void (*__cleanup_module_func_t)(void);
/* PCI/driver subsystem { */
-#ifndef pci_for_each_dev
-#define pci_for_each_dev(dev) for((dev)=pci_devices; (dev)!=NULL; (dev)=(dev)->next)
-#define pci_peek_next_dev(dev) ((dev)->next ? (dev)->next : NULL)
+#if 0 /* FIXME Don't know what to use to check for the proper kernel version */
#define DEVICE_COUNT_RESOURCE 6
#define PCI_BASEADDR_FLAGS(idx) base_address[idx]
#define PCI_BASEADDR_START(idx) base_address[idx] & ~0xFUL
@@ -169,11 +167,10 @@ typedef void (*__cleanup_module_func_t)(void);
(4 - size); \
})
#else
-#define pci_peek_next_dev(dev) ((dev) != pci_dev_g(&pci_devices) ? pci_dev_g((dev)->global_list.next) : NULL)
#define PCI_BASEADDR_FLAGS(idx) resource[idx].flags
#define PCI_BASEADDR_START(idx) resource[idx].start
#define PCI_BASEADDR_SIZE(dev,idx) (dev)->resource[idx].end - (dev)->resource[idx].start + 1
-#endif /* } ifndef pci_for_each_dev */
+#endif /* } ifndef 0 */
/* Compatability for the 2.3.x PCI DMA API. */
diff --git a/drivers/message/fusion/mptbase.c b/drivers/message/fusion/mptbase.c
index 2e7c2068e3a6..fe03b8e53786 100644
--- a/drivers/message/fusion/mptbase.c
+++ b/drivers/message/fusion/mptbase.c
@@ -1184,7 +1184,7 @@ mpt_pci_scan(void)
* Do some kind of look ahead here...
*/
if (pdev->devfn & 1) {
- pdev2 = pci_peek_next_dev(pdev);
+ pdev2 = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pdev);
if (pdev2 && (pdev2->vendor == 0x1000) &&
(PCI_SLOT(pdev2->devfn) == PCI_SLOT(pdev->devfn)) &&
(pdev2->device == pdev->device) &&