staging: vc04_services: fix up rpi firmware functions
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Oct 2016 13:16:55 +0000 (15:16 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 16 Oct 2016 08:26:12 +0000 (10:26 +0200)
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 <daniels@collabora.com>
Cc: "Noralf Trønnes" <noralf@tronnes.org>
Cc: Pranith Kumar <bobby.prani@gmail.com>
Cc: popcornmix <popcornmix@gmail.com>
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/soc/bcm2835/raspberrypi-firmware.h

index a06baffdf580b3c6811342d92c42238db3ddb12b..cb979ad90401e299344dd5fae38d09c489d8bd58 100644 (file)
@@ -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__ */