From c2c0b5d0011d37771b34bd661a0e7509807ad79d Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 2 Oct 2002 23:36:51 -0700 Subject: PCI: remove pcibios_find_class() --- include/linux/pci.h | 3 --- 1 file changed, 3 deletions(-) (limited to 'include/linux') diff --git a/include/linux/pci.h b/include/linux/pci.h index ba2e997304fd..ec8f0686e24a 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -533,7 +533,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); @@ -661,8 +660,6 @@ 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; } #define _PCI_NOP(o,s,t) \ static inline int pcibios_##o##_config_##s (u8 bus, u8 dfn, u8 where, t val) \ -- cgit v1.2.3 From 4a66ae8251604a7c8a262e8d2302a26de62a2b16 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 2 Oct 2002 23:45:53 -0700 Subject: PCI: remove pci_find_device() --- drivers/pci/compat.c | 17 ----------------- include/linux/pci.h | 3 --- 2 files changed, 20 deletions(-) (limited to 'include/linux') diff --git a/drivers/pci/compat.c b/drivers/pci/compat.c index 4082c8f087b2..51e9b0828d08 100644 --- a/drivers/pci/compat.c +++ b/drivers/pci/compat.c @@ -19,22 +19,6 @@ pcibios_present(void) return !list_empty(&pci_devices); } -int -pcibios_find_device(unsigned short vendor, unsigned short device, unsigned short index, - unsigned char *bus, unsigned char *devfn) -{ - const struct pci_dev *dev = NULL; - int cnt = 0; - - while ((dev = pci_find_device(vendor, device, dev))) - if (index == cnt++) { - *bus = dev->bus->number; - *devfn = dev->devfn; - return PCIBIOS_SUCCESSFUL; - } - return PCIBIOS_DEVICE_NOT_FOUND; -} - #define PCI_OP(rw,size,type) \ int pcibios_##rw##_config_##size (unsigned char bus, unsigned char dev_fn, \ unsigned char where, unsigned type val) \ @@ -59,4 +43,3 @@ EXPORT_SYMBOL(pcibios_read_config_dword); EXPORT_SYMBOL(pcibios_write_config_byte); EXPORT_SYMBOL(pcibios_write_config_word); EXPORT_SYMBOL(pcibios_write_config_dword); -EXPORT_SYMBOL(pcibios_find_device); diff --git a/include/linux/pci.h b/include/linux/pci.h index ec8f0686e24a..933e62a6813c 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -533,9 +533,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_device (unsigned short vendor, unsigned short dev_id, - unsigned short index, unsigned char *bus, - unsigned char *dev_fn); /* Generic PCI functions used internally */ -- cgit v1.2.3 From 36be8435c1ad70461e93840606a1b4ef2c9e7f5f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 3 Oct 2002 00:06:24 -0700 Subject: PCI: removed pcibios_present() --- drivers/net/hp100.c | 4 ++-- drivers/net/tulip/de4x5.c | 4 ++-- drivers/pci/compat.c | 8 -------- drivers/pci/syscall.c | 2 +- include/linux/pci.h | 21 ++++++++++----------- 5 files changed, 15 insertions(+), 24 deletions(-) (limited to 'include/linux') diff --git a/drivers/net/hp100.c b/drivers/net/hp100.c index 7a23fe6bd93b..de55257a8c7f 100644 --- a/drivers/net/hp100.c +++ b/drivers/net/hp100.c @@ -412,7 +412,7 @@ int __init hp100_probe(struct net_device *dev) /* 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; @@ -2960,7 +2960,7 @@ static int __init hp100_module_init(void) { 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 */ diff --git a/drivers/net/tulip/de4x5.c b/drivers/net/tulip/de4x5.c index 93c863801086..e4cc1f9eaf1f 100644 --- a/drivers/net/tulip/de4x5.c +++ b/drivers/net/tulip/de4x5.c @@ -2190,7 +2190,7 @@ pci_probe(struct net_device *dev, u_long ioaddr) if (lastPCI == NO_MORE_PCI) return; - if (!pcibios_present()) { + if (!pci_present()) { lastPCI = NO_MORE_PCI; return; /* No PCI bus in this machine! */ } @@ -5872,7 +5872,7 @@ count_adapters(void) 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; diff --git a/drivers/pci/compat.c b/drivers/pci/compat.c index 51e9b0828d08..048c610a9e62 100644 --- a/drivers/pci/compat.c +++ b/drivers/pci/compat.c @@ -13,12 +13,6 @@ /* 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) \ @@ -35,8 +29,6 @@ PCI_OP(write, byte, char) 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); diff --git a/drivers/pci/syscall.c b/drivers/pci/syscall.c index c935efd9a933..dd39d23d51ed 100644 --- a/drivers/pci/syscall.c +++ b/drivers/pci/syscall.c @@ -98,7 +98,7 @@ sys_pciconfig_write(unsigned long bus, unsigned long dfn, if (!capable(CAP_SYS_ADMIN)) return -EPERM; - if (!pcibios_present()) + if (!pci_present()) return -ENOSYS; dev = pci_find_slot(bus, dfn); diff --git a/include/linux/pci.h b/include/linux/pci.h index 933e62a6813c..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, @@ -656,7 +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 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) \ -- cgit v1.2.3