diff mbox series

[v2,04/32] pci: Remove guard around compatibility functions

Message ID 20210802005446.2267075-5-sjg@chromium.org
State Accepted
Commit e8c09d690be5bbaddd890859c2a00d9a6e6bd944
Delegated to: Tom Rini
Headers show
Series pci: Drop all pre-driver model code | expand

Commit Message

Simon Glass Aug. 2, 2021, 12:54 a.m. UTC
This prevents use of IS_ENABLED() in other files. Functions should be
visible in headers even if they are not available at link time.

Fix it.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 include/pci.h | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Tom Rini Aug. 6, 2021, 9:20 p.m. UTC | #1
On Sun, Aug 01, 2021 at 06:54:17PM -0600, Simon Glass wrote:

> This prevents use of IS_ENABLED() in other files. Functions should be
> visible in headers even if they are not available at link time.
> 
> Fix it.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/include/pci.h b/include/pci.h
index e07d6c31bc1..ca086420ff2 100644
--- a/include/pci.h
+++ b/include/pci.h
@@ -789,7 +789,6 @@  extern void pci_mpc85xx_init (struct pci_controller *hose);
 extern void imx_pcie_remove(void);
 #endif
 
-#if !defined(CONFIG_DM_PCI) || defined(CONFIG_DM_PCI_COMPAT)
 /**
  * pci_write_bar32() - Write the address of a BAR including control bits
  *
@@ -797,6 +796,8 @@  extern void imx_pcie_remove(void);
  * with devices which require hard-coded addresses, not part of the normal
  * PCI enumeration process.
  *
+ * This is only available if CONFIG_DM_PCI_COMPAT is enabled
+ *
  * @hose:	PCI hose to use
  * @dev:	PCI device to update
  * @barnum:	BAR number (0-5)
@@ -808,6 +809,8 @@  void pci_write_bar32(struct pci_controller *hose, pci_dev_t dev, int barnum,
 /**
  * pci_read_bar32() - read the address of a bar
  *
+ * This is only available if CONFIG_DM_PCI_COMPAT is enabled
+ *
  * @hose:	PCI hose to use
  * @dev:	PCI device to inspect
  * @barnum:	BAR number (0-5)
@@ -818,6 +821,8 @@  u32 pci_read_bar32(struct pci_controller *hose, pci_dev_t dev, int barnum);
 /**
  * pci_hose_find_devices() - Find devices by vendor/device ID
  *
+ * This is only available if CONFIG_DM_PCI_COMPAT is enabled
+ *
  * @hose:	PCI hose to search
  * @busnum:	Bus number to search
  * @ids:	PCI vendor/device IDs to look for, terminated by 0, 0 record
@@ -828,7 +833,6 @@  u32 pci_read_bar32(struct pci_controller *hose, pci_dev_t dev, int barnum);
  */
 pci_dev_t pci_hose_find_devices(struct pci_controller *hose, int busnum,
 				struct pci_device_id *ids, int *indexp);
-#endif /* !CONFIG_DM_PCI || CONFIG_DM_PCI_COMPAT */
 
 /* Access sizes for PCI reads and writes */
 enum pci_size_t {