diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-11 09:16:55 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-10-16 04:26:12 -0400 |
commit | d45f1a563b92dac7eeff817e8f5178caa47e2c16 (patch) | |
tree | 5f9bdfade7c501d31931c42e653107fedf853b4e | |
parent | df044ebfc5bfba6810e3940db458d7fb4572bc6f (diff) |
staging: vc04_services: fix up rpi firmware functions
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>
-rw-r--r-- | include/soc/bcm2835/raspberrypi-firmware.h | 19 |
1 files changed, 19 insertions, 0 deletions
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 { | |||
115 | RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, | 115 | RPI_FIRMWARE_GET_DMA_CHANNELS = 0x00060001, |
116 | }; | 116 | }; |
117 | 117 | ||
118 | #if IS_ENABLED(CONFIG_RASPBERRYPI_FIRMWARE) | ||
118 | int rpi_firmware_property(struct rpi_firmware *fw, | 119 | int rpi_firmware_property(struct rpi_firmware *fw, |
119 | u32 tag, void *data, size_t len); | 120 | u32 tag, void *data, size_t len); |
120 | int rpi_firmware_property_list(struct rpi_firmware *fw, | 121 | int rpi_firmware_property_list(struct rpi_firmware *fw, |
121 | void *data, size_t tag_size); | 122 | void *data, size_t tag_size); |
122 | struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node); | 123 | struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node); |
124 | #else | ||
125 | static inline int rpi_firmware_property(struct rpi_firmware *fw, u32 tag, | ||
126 | void *data, size_t len) | ||
127 | { | ||
128 | return 0; | ||
129 | } | ||
130 | |||
131 | static inline int rpi_firmware_property_list(struct rpi_firmware *fw, | ||
132 | void *data, size_t tag_size) | ||
133 | { | ||
134 | return 0; | ||
135 | } | ||
136 | |||
137 | static inline struct rpi_firmware *rpi_firmware_get(struct device_node *firmware_node) | ||
138 | { | ||
139 | return NULL; | ||
140 | } | ||
141 | #endif | ||
123 | 142 | ||
124 | #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ | 143 | #endif /* __SOC_RASPBERRY_FIRMWARE_H__ */ |