From f807c9a8e5dc916c8816f244542c20331eadd2b3 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Wed, 6 Oct 2004 00:08:21 -0700 Subject: [PATCH] [PATCH] PCI: pci_module_init() is identical to pci_register_driver() so just make it a #define It needs to stay this way until all usages of pci_module_init() are purged from the tree. Signed-off-by: Greg Kroah-Hartman --- include/linux/pci.h | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/include/linux/pci.h b/include/linux/pci.h index f021797cd805b..9bb6c7a96b0e7 100644 --- a/include/linux/pci.h +++ b/include/linux/pci.h @@ -674,6 +674,12 @@ struct pci_driver { .vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID +/* + * pci_module_init is obsolete, this stays here till we fix up all usages of it + * in the tree. + */ +#define pci_module_init pci_register_driver + /* these external functions are only available when PCI support is enabled */ #ifdef CONFIG_PCI @@ -894,7 +900,6 @@ static inline int pci_dev_present(const struct pci_device_id *ids) static inline void pci_set_master(struct pci_dev *dev) { } static inline int pci_enable_device(struct pci_dev *dev) { return -EIO; } static inline void pci_disable_device(struct pci_dev *dev) { } -static inline int pci_module_init(struct pci_driver *drv) { return -ENODEV; } static inline int pci_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } static inline int pci_dac_set_dma_mask(struct pci_dev *dev, u64 mask) { return -EIO; } static inline int pci_assign_resource(struct pci_dev *dev, int i) { return -EBUSY;} @@ -914,19 +919,6 @@ static inline int pci_enable_wake(struct pci_dev *dev, u32 state, int enable) { #else -/* - * a helper function which helps ensure correct pci_driver - * setup and cleanup for commonly-encountered hotplug/modular cases - * - * This MUST stay in a header, as it checks for -DMODULE - */ -static inline int pci_module_init(struct pci_driver *drv) -{ - int rc = pci_register_driver (drv); - - return rc < 0 ? rc : 0; -} - /* * PCI domain support. Sometimes called PCI segment (eg by ACPI), * a PCI domain is defined to be a set of PCI busses which share -- 2.53.0