From d45f1a563b92dac7eeff817e8f5178caa47e2c16 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 11 Oct 2016 15:16:55 +0200 Subject: [PATCH] staging: vc04_services: fix up rpi firmware functions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The raspberrypi-firmware.h file should provide empty functions if we aren't building in that option. This makes it easier to test-build code, and not have odd warnings about unused variables if you just try to #define away the functions. Cc: Daniel Stone Cc: "Noralf Trønnes" Cc: Pranith Kumar Cc: popcornmix Cc: Eric Anholt Signed-off-by: Greg Kroah-Hartman --- include/soc/bcm2835/raspberrypi-firmware.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/include/soc/bcm2835/raspberrypi-firmware.h b/include/soc/bcm2835/raspberrypi-firmware.h index a06baffdf580..cb979ad90401 100644 --- a/include/soc/bcm2835/raspberrypi-firmware.h +++ b/include/soc/bcm2835/raspberrypi-firmware.h @@ -115,10 +115,29 @@ enum rpi_firmware_property_tag { RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, }; +#if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE) int rpi_firmware_property(struct rpi_firmware *fw, u32 tag, void *data, size_t len); int rpi_firmware_property_list(struct rpi_firmware *fw, void *data, size_t tag_size); struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node); +#else +static inline int rpi_firmware_property(struct rpi_firmware *fw, u32 tag, + void *data, size_t len) +{ + return 0; +} + +static inline int rpi_firmware_property_list(struct rpi_firmware *fw, + void *data, size_t tag_size) +{ + return 0; +} + +static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node) +{ + return NULL; +} +#endif #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ -- 2.20.1