From ricknu-0@student.ltu.se Fri Dec 2 17:29:36 2005 Message-ID: <4390F614.7060202@student.ltu.se> Date: Sat, 03 Dec 2005 02:34:12 +0100 From: Richard Knutsson To: Andrew Morton CC: Greg KH Subject: [PATCH] pci: Schedule removal of pci_module_init From: Richard Knutsson Scheduled the removal of pci_module_init and __deprecated the function, as suggested by Andrew. Signed-off-by: Richard Knutsson Signed-off-by: Greg Kroah-Hartman --- Documentation/feature-removal-schedule.txt | 7 +++++++ include/linux/pci.h | 11 +++++------ 2 files changed, 12 insertions(+), 6 deletions(-) --- gregkh-2.6.orig/Documentation/feature-removal-schedule.txt +++ gregkh-2.6/Documentation/feature-removal-schedule.txt @@ -150,3 +150,10 @@ Why: The 8250 serial driver now has the brother on Alchemy SOCs. The loss of features is not considered an issue. Who: Ralf Baechle + +--------------------------- + +What: pci_module_init(driver) +When: April 2006 +Why: Is replaced by pci_register_driver(pci_driver). +Who: Richard Knutsson --- gregkh-2.6.orig/include/linux/pci.h +++ gregkh-2.6/include/linux/pci.h @@ -345,12 +345,6 @@ 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 @@ -502,6 +496,10 @@ void pci_enable_bridges(struct pci_bus * /* Proper probing supporting hot-pluggable devices */ int __pci_register_driver(struct pci_driver *, struct module *); +static inline int __deprecated pci_module_init(struct pci_driver *driver) +{ + return __pci_register_driver(driver, THIS_MODULE); +} static inline int pci_register_driver(struct pci_driver *driver) { return __pci_register_driver(driver, THIS_MODULE); @@ -621,6 +619,7 @@ static inline void pci_disable_device(st static inline int pci_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;} static inline int __pci_register_driver(struct pci_driver *drv, struct module *owner) { return 0;} +static inline int __deprecated pci_module_init(struct pci_driver *driver) { return 0; } static inline int pci_register_driver(struct pci_driver *drv) { return 0;} static inline void pci_unregister_driver(struct pci_driver *drv) { } static inline int pci_find_capability (struct pci_dev *dev, int cap) {return 0; }