]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dmi: add support for exact DMI matches in addition to substring matching
authorJani Nikula <jani.nikula@intel.com>
Wed, 19 Jun 2013 00:07:10 +0000 (10:07 +1000)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 19 Jun 2013 07:26:59 +0000 (17:26 +1000)
commit9211ea5e417fa273c80cba2eef1b3cc5a1654ae2
tree3200f41e4233c0ae489851aa3e88895eda3872c2
parent78fc8c88f3a997f142e696d82df91649f6140f39
dmi: add support for exact DMI matches in addition to substring matching

dmi_match() considers a substring match to be a successful match.  This is
not always sufficient to distinguish between DMI data for different
systems.  Add support for exact string matching using strcmp() in addition
to the substring matching using strstr().

The specific use case in the i915 driver is to allow us to use an exact
match for D510MO, without also incorrectly matching D510MOV:

{
.ident = "Intel D510MO",
.matches = {
DMI_MATCH(DMI_BOARD_VENDOR, "Intel"),
DMI_EXACT_MATCH(DMI_BOARD_NAME, "D510MO"),
},
}

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Cc: <annndddrr@gmail.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Cornel Panceac <cpanceac@gmail.com>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/firmware/dmi_scan.c
include/linux/mod_devicetable.h