]> bbs.cooldavid.org Git - net-next-2.6.git/blame - include/linux/dmi.h
Staging: rtl8187se: Fix compile warnings in 2.6.35-rc2
[net-next-2.6.git] / include / linux / dmi.h
CommitLineData
1da177e4
LT
1#ifndef __DMI_H__
2#define __DMI_H__
3
ebad6a42 4#include <linux/list.h>
d945b697 5#include <linux/mod_devicetable.h>
ebad6a42 6
d945b697 7/* enum dmi_field is in mod_devicetable.h */
1da177e4 8
ebad6a42
AP
9enum dmi_device_type {
10 DMI_DEV_TYPE_ANY = 0,
11 DMI_DEV_TYPE_OTHER,
12 DMI_DEV_TYPE_UNKNOWN,
13 DMI_DEV_TYPE_VIDEO,
14 DMI_DEV_TYPE_SCSI,
15 DMI_DEV_TYPE_ETHERNET,
16 DMI_DEV_TYPE_TOKENRING,
17 DMI_DEV_TYPE_SOUND,
b4bd7d59
WVS
18 DMI_DEV_TYPE_PATA,
19 DMI_DEV_TYPE_SATA,
20 DMI_DEV_TYPE_SAS,
2e0c1f6c 21 DMI_DEV_TYPE_IPMI = -1,
b4bd7d59 22 DMI_DEV_TYPE_OEM_STRING = -2,
ebad6a42
AP
23};
24
25struct dmi_header {
26 u8 type;
27 u8 length;
28 u16 handle;
29};
30
ebad6a42
AP
31struct dmi_device {
32 struct list_head list;
33 int type;
34 const char *name;
35 void *device_data; /* Type specific data */
36};
1da177e4 37
e9928674 38#ifdef CONFIG_DMI
1da177e4 39
1855256c 40extern int dmi_check_system(const struct dmi_system_id *list);
d7b1956f 41const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
1855256c
JG
42extern const char * dmi_get_system_info(int field);
43extern const struct dmi_device * dmi_find_device(int type, const char *name,
44 const struct dmi_device *from);
e9928674 45extern void dmi_scan_machine(void);
3e5cd1f2 46extern bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp);
1855256c 47extern int dmi_name_in_vendors(const char *str);
fd8cd7e1 48extern int dmi_name_in_serial(const char *str);
81b4e1f6 49extern int dmi_available;
e7a19c56
JD
50extern int dmi_walk(void (*decode)(const struct dmi_header *, void *),
51 void *private_data);
d61c72e5 52extern bool dmi_match(enum dmi_field f, const char *str);
e9928674 53
1da177e4
LT
54#else
55
1855256c
JG
56static inline int dmi_check_system(const struct dmi_system_id *list) { return 0; }
57static inline const char * dmi_get_system_info(int field) { return NULL; }
58static inline const struct dmi_device * dmi_find_device(int type, const char *name,
59 const struct dmi_device *from) { return NULL; }
7ae9392c 60static inline void dmi_scan_machine(void) { return; }
3e5cd1f2
TH
61static inline bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp)
62{
63 if (yearp)
64 *yearp = 0;
65 if (monthp)
66 *monthp = 0;
67 if (dayp)
68 *dayp = 0;
69 return false;
70}
1855256c 71static inline int dmi_name_in_vendors(const char *s) { return 0; }
fd8cd7e1 72static inline int dmi_name_in_serial(const char *s) { return 0; }
81b4e1f6 73#define dmi_available 0
e7a19c56
JD
74static inline int dmi_walk(void (*decode)(const struct dmi_header *, void *),
75 void *private_data) { return -1; }
d61c72e5
JS
76static inline bool dmi_match(enum dmi_field f, const char *str)
77 { return false; }
d8204ee2
KG
78static inline const struct dmi_system_id *
79 dmi_first_match(const struct dmi_system_id *list) { return NULL; }
1da177e4
LT
80
81#endif
82
83#endif /* __DMI_H__ */