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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>
Closes: https://lore.kernel.org/oe-kbuild-all/202308241954.oRNfVqmB-lkp@xxxxxxxxx/
Fixes: 26409dd04589 ("of: unittest: Add pci_dt_testdrv pci driver")
Signed-off-by: Lizhi Hou <lizhi.hou@xxxxxxx>
---
 drivers/of/unittest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;
-- 
2.34.1




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux