• Arnd Bergmann's avatar
    coresight: platform: add OF/APCI dependency · 745cfc56
    Arnd Bergmann authored
    When neither CONFIG_OF nor CONFIG_ACPI are set, we get a harmless
    build warning:
    
    drivers/hwtracing/coresight/coresight-platform.c:26:12: error: unused function 'coresight_alloc_conns'
          [-Werror,-Wunused-function]
    static int coresight_alloc_conns(struct device *dev,
               ^
    drivers/hwtracing/coresight/coresight-platform.c:46:1: error: unused function 'coresight_find_device_by_fwnode'
          [-Werror,-Wunused-function]
    coresight_find_device_by_fwnode(struct fwnode_handle *fwnode)
    
    As the code is useless in that configuration anyway, just add
    a Kconfig dependency that only allows building when at least
    one of the two is set.
    
    This should not hinder compile-testing, as CONFIG_OF can be
    enabled on any architecture.
    
    Fixes: 20961aea ("coresight: platform: Use fwnode handle for device search")
    Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
    Reviewed-by: default avatarSuzuki K Poulose <suzuki.poulose@arm.com>
    Signed-off-by: default avatarMathieu Poirier <mathieu.poirier@linaro.org>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    745cfc56
Kconfig 4.44 KB