diff options
author | Jean Delvare <khali@linux-fr.org> | 2009-03-30 15:46:44 -0400 |
---|---|---|
committer | Jean Delvare <khali@linux-fr.org> | 2009-03-30 15:46:44 -0400 |
commit | e7a19c5624c66afa8118b10cd59f87ee407646bc (patch) | |
tree | 4e70f99aa84cdd18f13c673980afebe4a268359e /include/linux/dmi.h | |
parent | ec19920944246b4686c7772a58507a20c361dc9d (diff) |
dmi: Let dmi_walk() users pass private data
At the moment, dmi_walk() lacks flexibility, users can't pass data to
the callback function. Add a pointer for private data to make this
function more flexible.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'include/linux/dmi.h')
-rw-r--r-- | include/linux/dmi.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/dmi.h b/include/linux/dmi.h index d741b9ceb0e0..bb5489c82c99 100644 --- a/include/linux/dmi.h +++ b/include/linux/dmi.h | |||
@@ -47,7 +47,8 @@ extern int dmi_get_year(int field); | |||
47 | extern int dmi_name_in_vendors(const char *str); | 47 | extern int dmi_name_in_vendors(const char *str); |
48 | extern int dmi_name_in_serial(const char *str); | 48 | extern int dmi_name_in_serial(const char *str); |
49 | extern int dmi_available; | 49 | extern int dmi_available; |
50 | extern int dmi_walk(void (*decode)(const struct dmi_header *)); | 50 | extern int dmi_walk(void (*decode)(const struct dmi_header *, void *), |
51 | void *private_data); | ||
51 | extern bool dmi_match(enum dmi_field f, const char *str); | 52 | extern bool dmi_match(enum dmi_field f, const char *str); |
52 | 53 | ||
53 | #else | 54 | #else |
@@ -61,8 +62,8 @@ static inline int dmi_get_year(int year) { return 0; } | |||
61 | static inline int dmi_name_in_vendors(const char *s) { return 0; } | 62 | static inline int dmi_name_in_vendors(const char *s) { return 0; } |
62 | static inline int dmi_name_in_serial(const char *s) { return 0; } | 63 | static inline int dmi_name_in_serial(const char *s) { return 0; } |
63 | #define dmi_available 0 | 64 | #define dmi_available 0 |
64 | static inline int dmi_walk(void (*decode)(const struct dmi_header *)) | 65 | static inline int dmi_walk(void (*decode)(const struct dmi_header *, void *), |
65 | { return -1; } | 66 | void *private_data) { return -1; } |
66 | static inline bool dmi_match(enum dmi_field f, const char *str) | 67 | static inline bool dmi_match(enum dmi_field f, const char *str) |
67 | { return false; } | 68 | { return false; } |
68 | static inline const struct dmi_system_id * | 69 | static inline const struct dmi_system_id * |