drivers/pc80/tpm: Rename tis_probe to tis_init
tis_init calls into tis_probe and returns an error or success, simplify the call stack by removing the current tis_init implementation and renaming tis_probe to tis_init. BUG=None TEST=builds Change-Id: I8e58eda66a44abf5858123cf9bcf620626f1b880 Signed-off-by: Jon Murphy <jpmurphy@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/77943 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Van Patten <timvp@google.com>
This commit is contained in:
parent
34ec32d54b
commit
a7c64d7465
|
@ -369,12 +369,14 @@ static int tis_command_ready(u8 locality)
|
|||
}
|
||||
|
||||
/*
|
||||
* tis_init()
|
||||
*
|
||||
* Probe the TPM device and try determining its manufacturer/device name.
|
||||
*
|
||||
* Returns 0 on success (the device is found or was found during an earlier
|
||||
* invocation) or TPM_DRIVER_ERR if the device is not found.
|
||||
*/
|
||||
static u32 tis_probe(void)
|
||||
int tis_init(void)
|
||||
{
|
||||
const char *device_name = "unknown";
|
||||
const char *vendor_name = device_name;
|
||||
|
@ -608,19 +610,6 @@ static u32 tis_readresponse(u8 *buffer, size_t *len)
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* tis_init()
|
||||
*
|
||||
* Initialize the TPM device. Returns 0 on success or TPM_DRIVER_ERR on
|
||||
* failure (in case device probing did not succeed).
|
||||
*/
|
||||
int tis_init(void)
|
||||
{
|
||||
if (tis_probe())
|
||||
return TPM_DRIVER_ERR;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* tis_open()
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue