]> asedeno.scripts.mit.edu Git - linux.git/commit
tpm: redefine read_log() to handle ACPI/OF at runtime
authorNayna Jain <nayna@linux.vnet.ibm.com>
Mon, 14 Nov 2016 10:00:54 +0000 (05:00 -0500)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Sun, 27 Nov 2016 23:31:32 +0000 (01:31 +0200)
commit02ae1382882f08c5804b996ca9c8d79b399dbe36
tree092dc7aa55337443505ab350a297e801edfc80e8
parentf40e68ef4a111d194a801abd1695f1ec8ef119ff
tpm: redefine read_log() to handle ACPI/OF at runtime

Currently, read_log() has two implementations: one for ACPI platforms
and the other for device tree(OF) based platforms. The proper one is
selected at compile time using Kconfig and #ifdef in the Makefile,
which is not the recommended approach.

This patch removes the #ifdef in the Makefile by defining a single
read_log() method, which checks for ACPI/OF event log properties at
runtime.

[jarkko.sakkinen@linux.intel.com: added tpm_ prefix to read_log*]

Suggested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Nayna Jain <nayna@linux.vnet.ibm.com>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/Makefile
drivers/char/tpm/tpm_acpi.c
drivers/char/tpm/tpm_eventlog.c
drivers/char/tpm/tpm_eventlog.h
drivers/char/tpm/tpm_of.c