Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

drivers: of: Fix of_pci.h header guard

The compilation of of_pci.c is governed by CONFIG_OF_PCI, but the
corresponding declarations in of_pci.h are inconsistently guarded by
CONFIG_OF, with the result that if CONFIG_PCI is disabled for an OF
platform, the dangling external declarations are still active and the
inline stub definitions not. So far this has managed to go unnoticed
since it happens that the only references to these functions are from
code which itself depends on CONFIG_PCI or CONFIG_OF_PCI.

Fix this with the appropriate config guard so that any new callers
outside PCI-specific code don't start unexpectedly breaking under
certain configs.

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Signed-off-by: Rob Herring <robh@kernel.org>

authored by

Robin Murphy and committed by
Rob Herring
5c1d3310 3eefa7e8

+1 -1
+1 -1
include/linux/of_pci.h
··· 8 8 struct of_phandle_args; 9 9 struct device_node; 10 10 11 - #ifdef CONFIG_OF 11 + #ifdef CONFIG_OF_PCI 12 12 int of_irq_parse_pci(const struct pci_dev *pdev, struct of_phandle_args *out_irq); 13 13 struct device_node *of_pci_find_child_device(struct device_node *parent, 14 14 unsigned int devfn);