summaryrefslogtreecommitdiff
path: root/include/linux/dmi.h
diff options
context:
space:
mode:
authorJean Delvare <jdelvare@suse.de>2019-12-03 11:20:37 +0100
committerJean Delvare <jdelvare@suse.de>2019-12-03 11:20:37 +0100
commit7c2378800cf7ac87e2663afa7f39d102871f0c28 (patch)
tree866e301cb6f697ca3dff16a716a6a3d8465cda5f /include/linux/dmi.h
parent9e0afe3910ff7e5493c5d8ebe3b499994b5e0272 (diff)
firmware: dmi: Add dmi_memdev_handle
Add a utility function dmi_memdev_handle() which returns the DMI handle associated with a given memory slot. This will allow kernel drivers to iterate over the memory slots. Signed-off-by: Jean Delvare <jdelvare@suse.de>
Diffstat (limited to 'include/linux/dmi.h')
-rw-r--r--include/linux/dmi.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/dmi.h b/include/linux/dmi.h
index 13a48b167e2d..927f8a8b7a1d 100644
--- a/include/linux/dmi.h
+++ b/include/linux/dmi.h
@@ -114,6 +114,7 @@ extern bool dmi_match(enum dmi_field f, const char *str);
extern void dmi_memdev_name(u16 handle, const char **bank, const char **device);
extern u64 dmi_memdev_size(u16 handle);
extern u8 dmi_memdev_type(u16 handle);
+extern u16 dmi_memdev_handle(int slot);
#else
@@ -144,6 +145,7 @@ static inline void dmi_memdev_name(u16 handle, const char **bank,
const char **device) { }
static inline u64 dmi_memdev_size(u16 handle) { return ~0ul; }
static inline u8 dmi_memdev_type(u16 handle) { return 0x0; }
+static inline u16 dmi_memdev_handle(int slot) { return 0xffff; }
static inline const struct dmi_system_id *
dmi_first_match(const struct dmi_system_id *list) { return NULL; }