DMI: allow omitting ident strings in DMI tables
authorDmitry Torokhov <dmitry.torokhov@gmail.com>
Fri, 4 Dec 2009 18:24:19 +0000 (10:24 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 28 Jan 2010 23:01:52 +0000 (15:01 -0800)
commit44d13be6ecdafef19772d84a290c6c9d53787db8
treeba86c6bc9f462d1469a204262c5af7e12969bc05
parent5172b4b0f1d06dd5cb27f335223131a2f08accb4
DMI: allow omitting ident strings in DMI tables

commit 75757507e014fa074d25d2883c4ab604999584bd upstream.

The purpose of dmi->ident is twofold - it may be used by DMI callback
functions when composing log messages; it is also used to determine
end of DMI table in dmi_check_system() and dmi_first_match(). However,
in case when callbacks are not interested in using ident at all it just
wastes memory. Let's make entries with empty first match slot serve as
end-of-table markers instead.

[needed for DMI table changes that need to be done by later patches - gkh]

Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/firmware/dmi_scan.c