From 94e01f5e6d01781e0c5f25a971a15f80e2146ef5 Mon Sep 17 00:00:00 2001 From: Julius Werner Date: Tue, 14 Mar 2017 12:43:48 -0700 Subject: [PATCH] tpm: spi: Fix compile-time bug with pointer arguments CL:452283 (tpm: spi: cr50: try to wake cr50 if it is asleep) introduced a compile-time error by passing an argument the wrong way (probably due to cherry-picking from an older branch and not testing it again). Due to a misconfiguration this slipped by our continuous integration testing. Fix it. Jeffy, please re-test with this patch on ToT when you have time so we can make sure the code actually works as intended now, too. BRANCH=None? BUG=None TEST=Compiled GRU_HAS_TPM2 board. Change-Id: I3210cd53014a206f5d36abcfe607a9710a8253fa Signed-off-by: Julius Werner Reviewed-on: https://chromium-review.googlesource.com/454921 Reviewed-by: Douglas Anderson --- src/drivers/spi/tpm/tpm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/drivers/spi/tpm/tpm.c b/src/drivers/spi/tpm/tpm.c index 0a7b3a25a9..3cb3994c86 100644 --- a/src/drivers/spi/tpm/tpm.c +++ b/src/drivers/spi/tpm/tpm.c @@ -157,9 +157,9 @@ static int start_transaction(int read_write, size_t bytes, unsigned addr) tpm_sync_needed = 1; /* Try to wake cr50 if it is asleep. */ - tpm_if.cs_assert(tpm_if.slave); + tpm_if.cs_assert(&tpm_if.slave); udelay(1); - tpm_if.cs_deassert(tpm_if.slave); + tpm_if.cs_deassert(&tpm_if.slave); udelay(100); /*