From: Prarit Bhargava <prarit(a)redhat.com>
pci.h: Fix static include
Add a static include to avoid a compile error for the RHEL specific PCI
functions.
This fixes the error:
... in function `pci_hw_disabled':
/home/kernel-ark/./include/linux/pci.h:1495: multiple definition of `pci_hw_disabled';
drivers/gpu/drm/nouveau/nvif/object.o:/home/kernel-ark/./include/linux/pci.h:1495: first
defined here
Signed-off-by: Prarit Bhargava <prarit(a)redhat.com>
diff --git a/drivers/pci/pci-driver.c b/drivers/pci/pci-driver.c
index blahblah..blahblah 100644
--- a/drivers/pci/pci-driver.c
+++ b/drivers/pci/pci-driver.c
@@ -371,7 +371,6 @@ const struct pci_device_id *pci_hw_disabled(const struct pci_device_id
*ids,
return ret;
}
EXPORT_SYMBOL(pci_hw_disabled);
-
#endif
struct drv_dev_and_id {
diff --git a/include/linux/pci.h b/include/linux/pci.h
index blahblah..blahblah 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -1491,8 +1491,8 @@ static inline const struct pci_device_id *pci_hw_deprecated(const
struct pci_dev
struct pci_dev *dev) { return NULL; }
static inline const struct pci_device_id *pci_hw_unmaintained(const struct pci_device_id
*ids,
struct pci_dev *dev) { return NULL; }
-const struct pci_device_id *pci_hw_disabled(const struct pci_device_id *ids,
- struct pci_dev *dev) {return NULL; }
+static inline const struct pci_device_id *pci_hw_disabled(const struct pci_device_id
*ids,
+ struct pci_dev *dev) {return NULL; }
#endif
int pci_scan_bridge(struct pci_bus *bus, struct pci_dev *dev, int max,
int pass);
--
https://gitlab.com/cki-project/kernel-ark/-/merge_requests/1523