]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
tpm_tis_spi: Use single function to transfer data
authorPeter Huewe <peter.huewe@infineon.com>
Thu, 2 Mar 2017 13:03:11 +0000 (13:03 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 25 May 2017 13:46:09 +0000 (15:46 +0200)
commitb0e2a93c289b416077dd15b0e448a82eb95b341e
tree0a51b234a2ed8fa5228341ce7669838ecd3f6af2
parent580c656a955cb604aa3a02ffb8563dfbdd0214c7
tpm_tis_spi: Use single function to transfer data

commit f848f2143ae42dc0918400039257a893835254d1 upstream.

The algorithm for sending data to the TPM is mostly identical to the
algorithm for receiving data from the TPM, so a single function is
sufficient to handle both cases.

This is a prequisite for all the other fixes, so we don't have to fix
everything twice (send/receive)

v2: u16 instead of u8 for the length.
Fixes: 0edbfea537d1 ("tpm/tpm_tis_spi: Add support for spi phy")
Signed-off-by: Alexander Steffen <Alexander.Steffen@infineon.com>
Signed-off-by: Peter Huewe <peter.huewe@infineon.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Tested-by: Benoit Houyere <benoit.houyere@st.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/tpm/tpm_tis_spi.c