Commit 36be8435 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

PCI: removed pcibios_present()

parent 4a66ae82
...@@ -412,7 +412,7 @@ int __init hp100_probe(struct net_device *dev) ...@@ -412,7 +412,7 @@ int __init hp100_probe(struct net_device *dev)
/* First: scan PCI bus(es) */ /* First: scan PCI bus(es) */
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
if (pcibios_present()) { if (pci_present()) {
int pci_index; int pci_index;
struct pci_dev *pci_dev = NULL; struct pci_dev *pci_dev = NULL;
int pci_id_index; int pci_id_index;
...@@ -2960,7 +2960,7 @@ static int __init hp100_module_init(void) ...@@ -2960,7 +2960,7 @@ static int __init hp100_module_init(void)
{ {
int i, cards; 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"); printk("hp100: You should not use auto-probing with insmod!\n");
/* Loop on all possible base addresses */ /* Loop on all possible base addresses */
......
...@@ -2190,7 +2190,7 @@ pci_probe(struct net_device *dev, u_long ioaddr) ...@@ -2190,7 +2190,7 @@ pci_probe(struct net_device *dev, u_long ioaddr)
if (lastPCI == NO_MORE_PCI) return; if (lastPCI == NO_MORE_PCI) return;
if (!pcibios_present()) { if (!pci_present()) {
lastPCI = NO_MORE_PCI; lastPCI = NO_MORE_PCI;
return; /* No PCI bus in this machine! */ return; /* No PCI bus in this machine! */
} }
...@@ -5872,7 +5872,7 @@ count_adapters(void) ...@@ -5872,7 +5872,7 @@ count_adapters(void)
if (EISA_signature(name, EISA_ID)) j++; if (EISA_signature(name, EISA_ID)) j++;
} }
#endif #endif
if (!pcibios_present()) return j; if (!pci_present()) return j;
for (i=0; (pdev=pci_find_class(class, pdev))!= NULL; i++) { for (i=0; (pdev=pci_find_class(class, pdev))!= NULL; i++) {
vendor = pdev->vendor; vendor = pdev->vendor;
......
...@@ -13,12 +13,6 @@ ...@@ -13,12 +13,6 @@
/* Obsolete functions, these will be going away... */ /* Obsolete functions, these will be going away... */
int
pcibios_present(void)
{
return !list_empty(&pci_devices);
}
#define PCI_OP(rw,size,type) \ #define PCI_OP(rw,size,type) \
int pcibios_##rw##_config_##size (unsigned char bus, unsigned char dev_fn, \ int pcibios_##rw##_config_##size (unsigned char bus, unsigned char dev_fn, \
unsigned char where, unsigned type val) \ unsigned char where, unsigned type val) \
...@@ -35,8 +29,6 @@ PCI_OP(write, byte, char) ...@@ -35,8 +29,6 @@ PCI_OP(write, byte, char)
PCI_OP(write, word, short) PCI_OP(write, word, short)
PCI_OP(write, dword, int) PCI_OP(write, dword, int)
EXPORT_SYMBOL(pcibios_present);
EXPORT_SYMBOL(pcibios_read_config_byte); EXPORT_SYMBOL(pcibios_read_config_byte);
EXPORT_SYMBOL(pcibios_read_config_word); EXPORT_SYMBOL(pcibios_read_config_word);
EXPORT_SYMBOL(pcibios_read_config_dword); EXPORT_SYMBOL(pcibios_read_config_dword);
......
...@@ -98,7 +98,7 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn, ...@@ -98,7 +98,7 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn,
if (!capable(CAP_SYS_ADMIN)) if (!capable(CAP_SYS_ADMIN))
return -EPERM; return -EPERM;
if (!pcibios_present()) if (!pci_present())
return -ENOSYS; return -ENOSYS;
dev = pci_find_slot(bus, dfn); dev = pci_find_slot(bus, dfn);
......
...@@ -322,15 +322,6 @@ enum pci_mmap_state { ...@@ -322,15 +322,6 @@ enum pci_mmap_state {
#define PCI_ANY_ID (~0) #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. * The pci_dev structure is used to describe both PCI and ISAPnP devices.
*/ */
...@@ -503,8 +494,17 @@ struct pci_driver { ...@@ -503,8 +494,17 @@ struct pci_driver {
/* these external functions are only available when PCI support is enabled */ /* these external functions are only available when PCI support is enabled */
#ifdef CONFIG_PCI #ifdef CONFIG_PCI
static inline int pci_present(void)
{
return !list_empty(&pci_devices);
}
#define pci_for_each_dev(dev) \ #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)) 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 *); void pcibios_fixup_bus(struct pci_bus *);
int pcibios_enable_device(struct pci_dev *, int mask); 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 *); ...@@ -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! */ /* Backward compatibility, don't use in new code! */
int pcibios_present(void);
int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn, int pcibios_read_config_byte (unsigned char bus, unsigned char dev_fn,
unsigned char where, unsigned char *val); unsigned char where, unsigned char *val);
int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn, int pcibios_read_config_word (unsigned char bus, unsigned char dev_fn,
...@@ -656,7 +655,7 @@ void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr); ...@@ -656,7 +655,7 @@ void pci_pool_free (struct pci_pool *pool, void *vaddr, dma_addr_t addr);
*/ */
#ifndef CONFIG_PCI #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) \ #define _PCI_NOP(o,s,t) \
static inline int pcibios_##o##_config_##s (u8 bus, u8 dfn, u8 where, t val) \ static inline int pcibios_##o##_config_##s (u8 bus, u8 dfn, u8 where, t val) \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment