Easiest and cleanest way for the dmi_system_id arrays is probably the
attached patch.
There are two downsides though:
1. It makes the inital kernel image bigger than needed (even if the memory
itself is freed later)
2. We have to make sure, that the string lengths fit into the given array
limits (else you get the compiler warning "initializer-string for array of
chars is too long")
I haven't tested how much memory this really saves.
please CC me on replies!
----------
Patch: store DMI const strings in __initdata section
Signed-off-by: Helge Deller <deller@gmx.de>
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -53,12 +53,12 @@ struct dmi_header {
*/
struct dmi_strmatch {
u8 slot;
- char *substr;
+ char substr[48];
};
struct dmi_system_id {
int (*callback)(const struct dmi_system_id *);
- const char *ident;
+ char ident[88];
struct dmi_strmatch matches[4];
void *driver_data;
};
--