1 #ifndef __LINUX_DMI_WRAPPER_H
2 #define __LINUX_DMI_WRAPPER_H 1
4 #include <linux/version.h>
5 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,23)
7 #include_next <linux/dmi.h>
9 #else /* linux version >= 2.6.23 */
14 #include <linux/list.h>
35 DMI_CHASSIS_ASSET_TAG,
39 enum dmi_device_type {
45 DMI_DEV_TYPE_ETHERNET,
46 DMI_DEV_TYPE_TOKENRING,
48 DMI_DEV_TYPE_IPMI = -1,
49 DMI_DEV_TYPE_OEM_STRING = -2
59 * DMI callbacks for problem boards
66 struct dmi_system_id {
67 int (*callback)(struct dmi_system_id *);
69 struct dmi_strmatch matches[4];
73 #define DMI_MATCH(a, b) { a, b }
76 struct list_head list;
79 void *device_data; /* Type specific data */
82 /* No CONFIG_DMI before 2.6.16 */
83 #if defined(CONFIG_DMI) || defined(CONFIG_X86_32)
85 extern int dmi_check_system(struct dmi_system_id *list);
86 extern char * dmi_get_system_info(int field);
87 extern struct dmi_device * dmi_find_device(int type, const char *name,
88 struct dmi_device *from);
89 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
90 extern void dmi_scan_machine(void);
92 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,17)
93 extern int dmi_get_year(int field);
95 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
96 extern int dmi_name_in_vendors(char *str);
101 static inline int dmi_check_system(struct dmi_system_id *list) { return 0; }
102 static inline char * dmi_get_system_info(int field) { return NULL; }
103 static inline struct dmi_device * dmi_find_device(int type, const char *name,
104 struct dmi_device *from) { return NULL; }
105 static inline int dmi_get_year(int year) { return 0; }
106 static inline int dmi_name_in_vendors(char *s) { return 0; }
110 #endif /* __DMI_H__ */
112 #endif /* linux kernel < 2.6.22 */