diff options
| author | Greg Kroah-Hartman <greg@kroah.com> | 2002-10-03 23:10:09 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <greg@kroah.com> | 2002-10-03 23:10:09 -0700 |
| commit | 0f6c515fd250978be2b521340cbf8cfd54183490 (patch) | |
| tree | ec428398b666009187eab876060f21a80fc46f94 /include/linux | |
| parent | b3819ec5b145e04795833505e61eb764b508eee6 (diff) | |
| parent | c4e4d47d1523eeda0925c94643b193b96400d35a (diff) | |
Merge kroah.com:/home/greg/linux/BK/bleeding_edge-2.5
into kroah.com:/home/greg/linux/BK/pci-2.5
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/pci.h | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h index ba2e997304fd..9c12d53f9dc7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -322,15 +322,6 @@ enum pci_mmap_state { #define PCI_ANY_ID (~0) -#define pci_present pcibios_present - - -#define pci_for_each_dev_reverse(dev) \ - for(dev = pci_dev_g(pci_devices.prev); dev != pci_dev_g(&pci_devices); dev = pci_dev_g(dev->global_list.prev)) - -#define pci_for_each_bus(bus) \ -for(bus = pci_bus_b(pci_root_buses.next); bus != pci_bus_b(&pci_root_buses); bus = pci_bus_b(bus->node.next)) - /* * The pci_dev structure is used to describe both PCI and ISAPnP devices. */ @@ -503,8 +494,17 @@ struct pci_driver { /* these external functions are only available when PCI support is enabled */ #ifdef CONFIG_PCI +static inline int pci_present(void) +{ + return !list_empty(&pci_devices); +} + #define pci_for_each_dev(dev) \ for(dev = pci_dev_g(pci_devices.next); dev != pci_dev_g(&pci_devices); dev = pci_dev_g(dev->global_list.next)) +#define pci_for_each_dev_reverse(dev) \ + for(dev = pci_dev_g(pci_devices.prev); dev != pci_dev_g(&pci_devices); dev = pci_dev_g(dev->global_list.prev)) +#define pci_for_each_bus(bus) \ + for(bus = pci_bus_b(pci_root_buses.next); bus != pci_bus_b(&pci_root_buses); bus = pci_bus_b(bus->node.next)) void pcibios_fixup_bus(struct pci_bus *); int pcibios_enable_device(struct pci_dev *, int mask); @@ -520,7 +520,6 @@ void pcibios_fixup_pbus_ranges(struct pci_bus *, struct pbus_set_ranges_data *); /* Backward compatibility, don't use in new code! */ -int pcibios_present(void); int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn, unsigned char where, unsigned char *val); int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn, @@ -533,10 +532,6 @@ int pcibios_write_config_word (unsigned char bus, unsigned char dev_fn, unsigned char where, unsigned short val); int pcibios_write_config_dword (unsigned char bus, unsigned char dev_fn, unsigned char where, unsigned int val); -int pcibios_find_class (unsigned int class_code, unsigned short index, unsigned char *bus, unsigned char *dev_fn); -int pcibios_find_device (unsigned short vendor, unsigned short dev_id, - unsigned short index, unsigned char *bus, - unsigned char *dev_fn); /* Generic PCI functions used internally */ @@ -660,9 +655,7 @@ void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr); */ #ifndef CONFIG_PCI -static inline int pcibios_present(void) { return 0; } -static inline int pcibios_find_class (unsigned int class_code, unsigned short index, unsigned char *bus, unsigned char *dev_fn) -{ return PCIBIOS_DEVICE_NOT_FOUND; } +static inline int pci_present(void) { return 0; } #define _PCI_NOP(o,s,t) \ static inline int pcibios_##o##_config_##s (u8 bus, u8 dfn, u8 where, t val) \ |
