lkml.org 
[lkml]   [2004]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    SubjectRe: [PATCH] PCI fixes for 2.6.9
    Date
    From
    ChangeSet 1.1997.37.62, 2004/10/06 14:08:21-07:00, greg@kroah.com

    [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@kroah.com>


    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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 14:07    [W:0.032 / U:62.300 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site