aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware')
-rw-r--r--drivers/firmware/dmi_scan.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/drivers/firmware/dmi_scan.c b/drivers/firmware/dmi_scan.c
index 3e526b6d00cb..4a597d8c2f70 100644
--- a/drivers/firmware/dmi_scan.c
+++ b/drivers/firmware/dmi_scan.c
@@ -81,9 +81,9 @@ static void dmi_table(u8 *buf, int len, int num,
81 const struct dmi_header *dm = (const struct dmi_header *)data; 81 const struct dmi_header *dm = (const struct dmi_header *)data;
82 82
83 /* 83 /*
84 * We want to know the total length (formated area and strings) 84 * We want to know the total length (formatted area and
85 * before decoding to make sure we won't run off the table in 85 * strings) before decoding to make sure we won't run off the
86 * dmi_decode or dmi_string 86 * table in dmi_decode or dmi_string
87 */ 87 */
88 data += dm->length; 88 data += dm->length;
89 while ((data - buf < len - 1) && (data[0] || data[1])) 89 while ((data - buf < len - 1) && (data[0] || data[1]))
@@ -467,6 +467,17 @@ const char *dmi_get_system_info(int field)
467} 467}
468EXPORT_SYMBOL(dmi_get_system_info); 468EXPORT_SYMBOL(dmi_get_system_info);
469 469
470/**
471 * dmi_name_in_serial - Check if string is in the DMI product serial
472 * information.
473 */
474int dmi_name_in_serial(const char *str)
475{
476 int f = DMI_PRODUCT_SERIAL;
477 if (dmi_ident[f] && strstr(dmi_ident[f], str))
478 return 1;
479 return 0;
480}
470 481
471/** 482/**
472 * dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information. 483 * dmi_name_in_vendors - Check if string is anywhere in the DMI vendor information.