tpm: move endianness conversion of ordinals to tpm_input_header
commita69faebf4d3e98c6a7a656c26b09bc532edfed08
authorRoberto Sassu <roberto.sassu@huawei.com>
Wed, 3 May 2017 16:19:10 +0000 (3 18:19 +0200)
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tue, 13 Jun 2017 19:02:08 +0000 (13 22:02 +0300)
treed15f355abcf69a193f02053f72cc8656152705b1
parent06e93279ca77ce2820723427f118a22dd0b35f0f
tpm: move endianness conversion of ordinals to tpm_input_header

Move CPU native value to big-endian conversion of ordinals to the
tpm_input_header declarations.

With the previous and this patch it will now be possible to modify TPM 1.2
functions to use tpm_buf_init(), which expects CPU native value for the
tag and ordinal arguments.

Signed-off-by: Roberto Sassu <roberto.sassu@huawei.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/tpm-interface.c
drivers/char/tpm/tpm-sysfs.c