From c81c525baf3b87846e06e586463beaaea6c4c68b Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Tue, 16 Apr 2024 13:24:59 +0100 Subject: [PATCH] PCI: tegra264: Remove private headers The only functions needed from the private pci.h header are pci_dev_is_disconnected() and of_get_pci_domain_nr(). Starting with Linux v6.9, pci_dev_is_disconnected() has been moved to the public header and now the private header conflicts with the public due to multiple definitions. It is better to remove the private pci.h header file and backport the upstream change that moves the definition of pci_dev_is_disconnected() to the public header. With regard to the function of_get_pci_domain_nr(), just declare an extern for the function prototype in the driver file rather than copying the entire kernel header. Bug 4471899 Change-Id: I10e7c3c6a92e9ba87153b2682cc3e69ced8c1a31 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-t264/+/3117272 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/pci/controller/private-soc/pcie-tegra264.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/pci/controller/private-soc/pcie-tegra264.c b/drivers/pci/controller/private-soc/pcie-tegra264.c index 64173701..5288efd2 100644 --- a/drivers/pci/controller/private-soc/pcie-tegra264.c +++ b/drivers/pci/controller/private-soc/pcie-tegra264.c @@ -18,13 +18,8 @@ #include #include #include -#include -#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) -#include -#else -#include -#endif +extern int of_get_pci_domain_nr(struct device_node *node); #define PCIE_LINK_UP_DELAY 10000 /* 10 msec */ #define PCIE_LINK_UP_TIMEOUT 1000000 /* 1 s */