From b7245e829caee36e0a45923d2d081ed85a2a779c Mon Sep 17 00:00:00 2001 From: Matthew Wilcox Date: Thu, 19 Jun 2003 22:31:01 -0700 Subject: [PATCH] reimplement pci proc name Hi Greg. Ivan's not happy with the solution I came up with for naming /proc/bus/pci and Anton would prefer something slightly different too, so I abstracted the name out so each architecture can do its own thing. This is against 2.5.72 so won't apply cleanly to your tree (it applies to bitkeeper as of a few minutes ago with only minor offsets). I've implemented the original name for non-PCI-domain machines; done what ia64 and alpha need, respectively (assuming I didn't misunderstand Ivan), and plopped in the Old Way of doing things for Sparc64, PPC and PPC64. Maintainers may alter this to whatever degree of complexity they wish. --- include/linux/pci.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'include/linux') diff --git a/include/linux/pci.h b/include/linux/pci.h index 87ad2d6fd1e7..0a2ecb5fd9e7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -768,6 +768,11 @@ static inline int pci_module_init(struct pci_driver *drv) */ #ifndef CONFIG_PCI_DOMAINS static inline int pci_domain_nr(struct pci_bus *bus) { return 0; } +static inline int pci_name_bus(char *name, struct pci_bus *bus) +{ + sprintf(name, "%02x", bus->number); + return 0; +} #endif #endif /* !CONFIG_PCI */ -- cgit v1.2.3