Skip to content

Commit

Permalink
Fix longstanding "error: storage size of '__mod_dmi_device_table' isn…
Browse files Browse the repository at this point in the history
…'t known"

gcc 3.4.6 doesn't like MODULE_DEVICE_TABLE(dmi, x) expansion enough to
error out.  Shut it up in a most simple way.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Alexey Dobriyan authored and Linus Torvalds committed Jan 28, 2009
1 parent 490a8d7 commit 40413dc
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions include/linux/mod_devicetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -443,6 +443,13 @@ struct dmi_system_id {
struct dmi_strmatch matches[4];
void *driver_data;
};
/*
* struct dmi_device_id appears during expansion of
* "MODULE_DEVICE_TABLE(dmi, x)". Compiler doesn't look inside it
* but this is enough for gcc 3.4.6 to error out:
* error: storage size of '__mod_dmi_device_table' isn't known
*/
#define dmi_device_id dmi_system_id
#endif

#define DMI_MATCH(a, b) { a, b }
Expand Down

0 comments on commit 40413dc

Please sign in to comment.