Re: [PATCH] PCI fixes for 2.6.9

From: Greg KH
Date: Tue Oct 19 2004 - 18:23:27 EST


ChangeSet 1.1997.37.62, 2004/10/06 14:08:21-07:00, greg@xxxxxxxxx

[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 <greg@xxxxxxxxx>


include/linux/pci.h | 20 ++++++--------------
1 files changed, 6 insertions(+), 14 deletions(-)


diff -Nru a/include/linux/pci.h b/include/linux/pci.h
--- a/include/linux/pci.h 2004-10-19 15:21:49 -07:00
+++ b/include/linux/pci.h 2004-10-19 15:21:49 -07:00
@@ -674,6 +674,12 @@
.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 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;}
@@ -913,19 +918,6 @@
#define isa_bridge ((struct pci_dev *)NULL)

#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),

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/