coresight: platform: add OF/APCI dependency
authorArnd Bergmann <arnd@arndb.de>
Wed, 19 Jun 2019 19:53:17 +0000 (13:53 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 20 Jun 2019 06:06:56 +0000 (08:06 +0200)
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: 20961aea982e ("coresight: platform: Use fwnode handle for device search")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Suzuki K Poulose <suzuki.poulose@arm.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/Kconfig

index 5487d4a1abc2a1ce4397292035668cab7d2784a1..14638db4991de8e922c8cdb26979a1989ae47ec9 100644 (file)
@@ -4,6 +4,7 @@
 #
 menuconfig CORESIGHT
        bool "CoreSight Tracing Support"
+       depends on OF || ACPI
        select ARM_AMBA
        select PERF_EVENTS
        help