]> git.karo-electronics.de Git - karo-tx-linux.git/commit
dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present()
authorBen Hutchings <ben@decadent.org.uk>
Wed, 20 Mar 2013 04:07:49 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:34:06 +0000 (16:34 +1100)
commit2a4e977f4f8308ec6759374519a78e3cd3ce4486
treec141902999dad40932e94d3853456760edfdcb44
parent9b7faefcbd16ea7964ce3b779a09b06c1df57c68
dmi_scan: refactor dmi_scan_machine(), {smbios,dmi}_present()

Move the calls to memcpy_fromio() up into the loop in dmi_scan_machine(),
and move the signature checks back down into dmi_decode().  We need to
check at 16-byte intervals but keep a 32-byte buffer for an SMBIOS entry,
so shift the buffer after each iteration.

Merge smbios_present() into dmi_present(), so we look for an SMBIOS
signature at the beginning of the given buffer and then for a DMI
signature at an offset of 16 bytes.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reported-by: Tim McGrath <tmhikaru@gmail.com>
Tested-by: Tim Mcgrath <tmhikaru@gmail.com>
Cc: Zhenzhong Duan <zhenzhong.duan@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/firmware/dmi_scan.c