Andrew Morton wrote:
Richard Knutsson <[email protected]> wrote:
+#if 0
/*
* 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
+#endif
This one's a bit optimistic. We need to wait until Linus's patch is fully
converted, than wait a bit.
You might investigate turning this into an inline function, then mark it
__deprecated and generate a Documentation/feature-removal-schedule.txt
record for it.
-
From: Richard Knutsson <[email protected]>
Scheduled the removal of pci_module_init and __deprecated the function,
as suggested by Andrew.
Signed-off-by: Richard Knutsson <[email protected]>
---
diff -Narup a/Documentation/feature-removal-schedule.txt b/Documentation/feature-removal-schedule.txt
--- a/Documentation/feature-removal-schedule.txt 2005-11-29 11:08:41.000000000 +0100
+++ b/Documentation/feature-removal-schedule.txt 2005-12-03 01:21:46.000000000 +0100
@@ -159,3 +159,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 <[email protected]>
+
+---------------------------
+
+What: pci_module_init(driver)
+When: April 2006
+Why: Is replaced by pci_register_driver(pci_driver).
+Who: Richard Knutsson <[email protected]>
diff -Narup a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h 2005-11-29 11:09:05.000000000 +0100
+++ b/include/linux/pci.h 2005-12-03 01:40:40.000000000 +0100
@@ -277,12 +277,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
@@ -434,6 +428,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);
@@ -553,6 +551,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; }
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[Index of Archives]
[Kernel Newbies]
[Netfilter]
[Bugtraq]
[Photo]
[Stuff]
[Gimp]
[Yosemite News]
[MIPS Linux]
[ARM Linux]
[Linux Security]
[Linux RAID]
[Video 4 Linux]
[Linux for the blind]
[Linux Resources]