Skip to content
  • Robin Murphy's avatar
    drivers: of: Fix of_pci.h header guard · 5c1d3310
    Robin Murphy authored and Rob Herring's avatar Rob Herring committed
    
    
    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: default avatarRobin Murphy <robin.murphy@arm.com>
    Signed-off-by: default avatarRob Herring <robh@kernel.org>
    5c1d3310