[PATCH] include/linux/mod_devicetable.h: fix compilation problem induced by MODULE_DEVICE_TABLE(dmi, ...)

From: Henrik Rydberg
Date: Tue Jan 27 2009 - 13:48:29 EST


From: Alexey Dobriyan <adobriyan@xxxxxxxxx>

Bugzilla 12483:

Kernel build fails with gcc3 (not gcc4), because
MODULE_DEVICE_TABLE(dmi, ...) expands to extern const struct
dmi_device_id __mod_dmi_device_table, and struct dmi_device_id doesn't
exist.

Steps to reproduce:
Build kernel 2.6.28 or 2.6.29-rc2 on x86 with gcc 3.

This patch remedies the problem.

Signed-off-by: Henrik Rydberg <rydberg@xxxxxxxxxxx>
---
include/linux/mod_devicetable.h | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h
index 97b91d1..aec76e6 100644
--- a/include/linux/mod_devicetable.h
+++ b/include/linux/mod_devicetable.h
@@ -443,6 +443,7 @@ struct dmi_system_id {
struct dmi_strmatch matches[4];
void *driver_data;
};
+#define dmi_device_id dmi_system_id
#endif

#define DMI_MATCH(a, b) { a, b }
--
1.5.6.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/