Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dmi.h
Go to the documentation of this file.
1 #ifndef __DMI_H__
2 #define __DMI_H__
3 
4 #include <linux/list.h>
6 
7 /* enum dmi_field is in mod_devicetable.h */
8 
24 };
25 
71 };
72 
73 struct dmi_header {
77 };
78 
79 struct dmi_device {
80  struct list_head list;
81  int type;
82  const char *name;
83  void *device_data; /* Type specific data */
84 };
85 
86 #ifdef CONFIG_DMI
87 
88 struct dmi_dev_onboard {
89  struct dmi_device dev;
90  int instance;
91  int segment;
92  int bus;
93  int devfn;
94 };
95 
96 extern int dmi_check_system(const struct dmi_system_id *list);
97 const struct dmi_system_id *dmi_first_match(const struct dmi_system_id *list);
98 extern const char * dmi_get_system_info(int field);
99 extern const struct dmi_device * dmi_find_device(int type, const char *name,
100  const struct dmi_device *from);
101 extern void dmi_scan_machine(void);
102 extern bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp);
103 extern int dmi_name_in_vendors(const char *str);
104 extern int dmi_name_in_serial(const char *str);
105 extern int dmi_available;
106 extern int dmi_walk(void (*decode)(const struct dmi_header *, void *),
107  void *private_data);
108 extern bool dmi_match(enum dmi_field f, const char *str);
109 
110 #else
111 
112 static inline int dmi_check_system(const struct dmi_system_id *list) { return 0; }
113 static inline const char * dmi_get_system_info(int field) { return NULL; }
114 static inline const struct dmi_device * dmi_find_device(int type, const char *name,
115  const struct dmi_device *from) { return NULL; }
116 static inline void dmi_scan_machine(void) { return; }
117 static inline bool dmi_get_date(int field, int *yearp, int *monthp, int *dayp)
118 {
119  if (yearp)
120  *yearp = 0;
121  if (monthp)
122  *monthp = 0;
123  if (dayp)
124  *dayp = 0;
125  return false;
126 }
127 static inline int dmi_name_in_vendors(const char *s) { return 0; }
128 static inline int dmi_name_in_serial(const char *s) { return 0; }
129 #define dmi_available 0
130 static inline int dmi_walk(void (*decode)(const struct dmi_header *, void *),
131  void *private_data) { return -1; }
132 static inline bool dmi_match(enum dmi_field f, const char *str)
133  { return false; }
134 static inline const struct dmi_system_id *
135  dmi_first_match(const struct dmi_system_id *list) { return NULL; }
136 
137 #endif
138 
139 #endif /* __DMI_H__ */