/* First: scan PCI bus(es) */
#ifdef CONFIG_PCI
- if (pcibios_present()) {
+ if (pci_present()) {
int pci_index;
struct pci_dev *pci_dev = NULL;
int pci_id_index;
{
int i, cards;
- if (hp100_port == 0 && !EISA_bus && !pcibios_present())
+ if (hp100_port == 0 && !EISA_bus && !pci_present())
printk("hp100: You should not use auto-probing with insmod!\n");
/* Loop on all possible base addresses */
if (lastPCI == NO_MORE_PCI) return;
- if (!pcibios_present()) {
+ if (!pci_present()) {
lastPCI = NO_MORE_PCI;
return; /* No PCI bus in this machine! */
}
if (EISA_signature(name, EISA_ID)) j++;
}
#endif
- if (!pcibios_present()) return j;
+ if (!pci_present()) return j;
for (i=0; (pdev=pci_find_class(class, pdev))!= NULL; i++) {
vendor = pdev->vendor;
/* Obsolete functions, these will be going away... */
-int
-pcibios_present(void)
-{
- return !list_empty(&pci_devices);
-}
-
#define PCI_OP(rw,size,type) \
int pcibios_##rw##_config_##size (unsigned char bus, unsigned char dev_fn, \
unsigned char where, unsigned type val) \
PCI_OP(write, word, short)
PCI_OP(write, dword, int)
-
-EXPORT_SYMBOL(pcibios_present);
EXPORT_SYMBOL(pcibios_read_config_byte);
EXPORT_SYMBOL(pcibios_read_config_word);
EXPORT_SYMBOL(pcibios_read_config_dword);
#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.
*/
/* 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);
/* 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,
*/
#ifndef CONFIG_PCI
-static inline int pcibios_present(void) { return 0; }
+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) \