From abbdc56b17d662ae710bc0c30cf0d0e9da805fd4 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 10 Oct 2016 12:05:14 +0200 Subject: [PATCH] staging: vc04_services: add CONFIG_COMPILE_TEST ability MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It would be nice to be able to build this code on other platforms other than only the RPi, so add some empty macros to allow this to happen, and turn off BROKEN as the code can now build properly thanks to Michael's work. Cc: Michael Zoran Cc: Daniel Stone Cc: "Noralf Trønnes" Cc: Pranith Kumar Cc: popcornmix Cc: Eric Anholt Signed-off-by: Greg Kroah-Hartman --- drivers/staging/vc04_services/Kconfig | 2 +- drivers/staging/vc04_services/interface/vchiq_arm/vchiq.h | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/staging/vc04_services/Kconfig b/drivers/staging/vc04_services/Kconfig index f839a54..660dced 100644 --- a/drivers/staging/vc04_services/Kconfig +++ b/drivers/staging/vc04_services/Kconfig @@ -1,6 +1,6 @@ config BCM2835_VCHIQ tristate "Videocore VCHIQ" - depends on RASPBERRYPI_FIRMWARE && BROKEN + depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST default y help Kernel to VideoCore communication interface for the diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq.h b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq.h index ad398ba..21adf89 100644 --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq.h +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq.h @@ -37,4 +37,15 @@ #include "vchiq_if.h" #include "vchiq_util.h" +/* Do this so that we can test-build the code on non-rpi systems */ +#if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE) + +#else + +#ifndef dsb +#define dsb(a) +#endif + +#endif /* IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE) */ + #endif -- 2.7.4