tpm: fix byte-order for the value read by tpm2_get_tpm_pt
authorapronin@chromium.org <apronin@chromium.org>
Fri, 15 Jul 2016 01:07:18 +0000 (18:07 -0700)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 19 Jul 2016 14:43:38 +0000 (17:43 +0300)
commit1b0612b04090e416828c0dd5ed197b0913d834a0
tree2a55178a9b891bab715a0e4dedf70f70c77af64b
parent79b591c091b31291fecd9551db0a67fdc5901d50
tpm: fix byte-order for the value read by tpm2_get_tpm_pt

The result must be converted from BE byte order, which is used by the
TPM2 protocol. This has not popped out because tpm2_get_tpm_pt() has
been only used for probing.

Fixes: 7a1d7e6dd76a ("tpm: TPM 2.0 baseline support")
Change-Id: I7d71cd379b1a3b7659d20a1b6008216762596590
Signed-off-by: Andrey Pronin <apronin@chromium.org>
Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
drivers/char/tpm/tpm2-cmd.c