hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/include/linux/firmware.h
....@@ -12,7 +12,6 @@
1212 struct firmware {
1313 size_t size;
1414 const u8 *data;
15
- struct page **pages;
1615
1716 /* firmware loader private fields */
1817 void *priv;
....@@ -37,13 +36,15 @@
3736
3837 #define DECLARE_BUILTIN_FIRMWARE_SIZE(name, blob, size) \
3938 static const struct builtin_fw __fw_concat(__builtin_fw,__COUNTER__) \
40
- __used __section(.builtin_fw) = { name, blob, size }
39
+ __used __section(".builtin_fw") = { name, blob, size }
4140
4241 #if defined(CONFIG_FW_LOADER) || (defined(CONFIG_FW_LOADER_MODULE) && defined(MODULE))
4342 int request_firmware(const struct firmware **fw, const char *name,
4443 struct device *device);
4544 int firmware_request_nowarn(const struct firmware **fw, const char *name,
4645 struct device *device);
46
+int firmware_request_platform(const struct firmware **fw, const char *name,
47
+ struct device *device);
4748 int request_firmware_nowait(
4849 struct module *module, bool uevent,
4950 const char *name, struct device *device, gfp_t gfp, void *context,
....@@ -52,6 +53,9 @@
5253 struct device *device);
5354 int request_firmware_into_buf(const struct firmware **firmware_p,
5455 const char *name, struct device *device, void *buf, size_t size);
56
+int request_partial_firmware_into_buf(const struct firmware **firmware_p,
57
+ const char *name, struct device *device,
58
+ void *buf, size_t size, size_t offset);
5559
5660 void release_firmware(const struct firmware *fw);
5761 #else
....@@ -65,6 +69,13 @@
6569 static inline int firmware_request_nowarn(const struct firmware **fw,
6670 const char *name,
6771 struct device *device)
72
+{
73
+ return -EINVAL;
74
+}
75
+
76
+static inline int firmware_request_platform(const struct firmware **fw,
77
+ const char *name,
78
+ struct device *device)
6879 {
6980 return -EINVAL;
7081 }
....@@ -94,6 +105,15 @@
94105 return -EINVAL;
95106 }
96107
108
+static inline int request_partial_firmware_into_buf
109
+ (const struct firmware **firmware_p,
110
+ const char *name,
111
+ struct device *device,
112
+ void *buf, size_t size, size_t offset)
113
+{
114
+ return -EINVAL;
115
+}
116
+
97117 #endif
98118
99119 int firmware_request_cache(struct device *device, const char *name);