diff mbox series

[1/1] of: unittest: pci_dt_testdrv: Fix compile error

Message ID 1692896179-73192-1-git-send-email-lizhi.hou@amd.com
State New
Headers show
Series [1/1] of: unittest: pci_dt_testdrv: Fix compile error | expand

Commit Message

Lizhi Hou Aug. 24, 2023, 4:56 p.m. UTC
pci_dt_testdrv depends on both PCI_DYNAMIC_OF_NODES and OF_OVERLAY.
Add #if check for OF_OVERLAY.

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202308241954.oRNfVqmB-lkp@intel.com/
Fixes: 26409dd04589 ("of: unittest: Add pci_dt_testdrv pci driver")
Signed-off-by: Lizhi Hou <lizhi.hou@amd.com>
---
 drivers/of/unittest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/of/unittest.c b/drivers/of/unittest.c
index fef46a9a5e81..beb75d3b33f8 100644
--- a/drivers/of/unittest.c
+++ b/drivers/of/unittest.c
@@ -3732,7 +3732,7 @@  static inline __init void of_unittest_overlay_high_level(void) {}
 
 #endif
 
-#ifdef CONFIG_PCI_DYNAMIC_OF_NODES
+#if defined(CONFIG_PCI_DYNAMIC_OF_NODES) && defined(CONFIG_OF_OVERLAY)
 
 static int of_unittest_pci_dev_num;
 static int of_unittest_pci_child_num;