Message ID | 1448828291-12660-15-git-send-email-sjg@chromium.org |
---|---|
State | Accepted |
Commit | 0fe9cb0fbb6214f8931f000b14aa43dab86a84b9 |
Delegated to: | Simon Glass |
Headers | show |
On Mon, Nov 30, 2015 at 4:17 AM, Simon Glass <sjg@chromium.org> wrote: > Move these functions into the compatibility file so that they are not > available by default. > > Signed-off-by: Simon Glass <sjg@chromium.org> > --- > > Changes in v2: > - Move the functions into pci_common.c so they can be used by old code > - Reword the commit message for clarity > > drivers/pci/pci_common.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/pci/pci_common.c b/drivers/pci/pci_common.c > index 2a14902..a4573b0 100644 > --- a/drivers/pci/pci_common.c > +++ b/drivers/pci/pci_common.c > @@ -313,6 +313,7 @@ pci_addr_t pci_hose_phys_to_bus(struct pci_controller *hose, > return bus_addr; > } > > +#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT) > pci_dev_t pci_find_device(unsigned int vendor, unsigned int device, int index) > { > struct pci_device_id ids[2] = { {}, {0, 0} }; > @@ -363,3 +364,4 @@ pci_dev_t pci_hose_find_devices(struct pci_controller *hose, int busnum, > > return -1; > } > +#endif /* !CONFIG_DM_PCI || CONFIG_DM_PCI_COMPAT */ > -- Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
Applied to u-boot-dm/next.
diff --git a/drivers/pci/pci_common.c b/drivers/pci/pci_common.c index 2a14902..a4573b0 100644 --- a/drivers/pci/pci_common.c +++ b/drivers/pci/pci_common.c @@ -313,6 +313,7 @@ pci_addr_t pci_hose_phys_to_bus(struct pci_controller *hose, return bus_addr; } +#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT) pci_dev_t pci_find_device(unsigned int vendor, unsigned int device, int index) { struct pci_device_id ids[2] = { {}, {0, 0} }; @@ -363,3 +364,4 @@ pci_dev_t pci_hose_find_devices(struct pci_controller *hose, int busnum, return -1; } +#endif /* !CONFIG_DM_PCI || CONFIG_DM_PCI_COMPAT */
Move these functions into the compatibility file so that they are not available by default. Signed-off-by: Simon Glass <sjg@chromium.org> --- Changes in v2: - Move the functions into pci_common.c so they can be used by old code - Reword the commit message for clarity drivers/pci/pci_common.c | 2 ++ 1 file changed, 2 insertions(+)