firmware: make fw->data const
[deliverable/linux.git] / include / linux / firmware.h
index 2d716080be4af7bd98fad2a5a45cd4b884812cd0..88718d60153c0332e1154ccc240cd5c15b46d618 100644 (file)
@@ -8,9 +8,12 @@
 
 struct firmware {
        size_t size;
-       u8 *data;
+       const u8 *data;
 };
+
 struct device;
+
+#if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE))
 int request_firmware(const struct firmware **fw, const char *name,
                     struct device *device);
 int request_firmware_nowait(
@@ -19,5 +22,24 @@ int request_firmware_nowait(
        void (*cont)(const struct firmware *fw, void *context));
 
 void release_firmware(const struct firmware *fw);
-void register_firmware(const char *name, const u8 *data, size_t size);
+#else
+static inline int request_firmware(const struct firmware **fw,
+                                  const char *name,
+                                  struct device *device)
+{
+       return -EINVAL;
+}
+static inline int request_firmware_nowait(
+       struct module *module, int uevent,
+       const char *name, struct device *device, void *context,
+       void (*cont)(const struct firmware *fw, void *context))
+{
+       return -EINVAL;
+}
+
+static inline void release_firmware(const struct firmware *fw)
+{
+}
+#endif
+
 #endif
This page took 0.02577 seconds and 5 git commands to generate.