From: Kevin O'Connor Date: Thu, 19 Nov 2015 23:03:35 +0000 (-0500) Subject: tpm: Add wrapper function tpmhw_set_timeouts() X-Git-Tag: rel-1.10.0~125 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ba86edb93ad2b4b19d2f571f4fd078d54ffd4f07;p=seabios.git tpm: Add wrapper function tpmhw_set_timeouts() Signed-off-by: Kevin O'Connor --- diff --git a/src/tcgbios.c b/src/tcgbios.c index d7fe0ad..4e146bd 100644 --- a/src/tcgbios.c +++ b/src/tcgbios.c @@ -161,6 +161,13 @@ transmit(u8 locty, struct tpm_req_header *req, return 0; } +static void +tpmhw_set_timeouts(u32 timeouts[4], u32 durations[3]) +{ + struct tpm_driver *td = &tpm_drivers[TPMHW_driver_to_use]; + td->set_timeouts(timeouts, durations); +} + /**************************************************************** * ACPI TCPA table interface @@ -383,7 +390,6 @@ determine_timeouts(void) u32 returnCode; struct tpm_res_getcap_timeouts timeouts; struct tpm_res_getcap_durations durations; - struct tpm_driver *td = &tpm_drivers[TPMHW_driver_to_use]; u32 i; rc = build_and_send_cmd(0, TPM_ORD_GetCapability, @@ -427,8 +433,7 @@ determine_timeouts(void) durations.durations[1], durations.durations[2]); - - td->set_timeouts(timeouts.timeouts, durations.durations); + tpmhw_set_timeouts(timeouts.timeouts, durations.durations); return 0;