mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-11 07:34:31 +00:00
cmd: tpm-v1: fix compile error in TPMv1 list resources command
This command is not compiled by default and was not updated to pass the udevice to tpm_get_capability. Signed-off-by: Mathew McBride <matt@traverse.com.au> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
This commit is contained in:
parent
3144ba23bf
commit
ebb6d74df3
1 changed files with 6 additions and 1 deletions
|
@ -582,6 +582,7 @@ static int do_tpm_flush(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||
static int do_tpm_list(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
struct udevice *dev;
|
||||
int type = 0;
|
||||
u16 res_count;
|
||||
u8 buf[288];
|
||||
|
@ -589,6 +590,10 @@ static int do_tpm_list(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||
int err;
|
||||
uint i;
|
||||
|
||||
err = get_tpm(&dev);
|
||||
if (err)
|
||||
return err;
|
||||
|
||||
if (argc != 2)
|
||||
return CMD_RET_USAGE;
|
||||
|
||||
|
@ -619,7 +624,7 @@ static int do_tpm_list(struct cmd_tbl *cmdtp, int flag, int argc,
|
|||
}
|
||||
|
||||
/* fetch list of already loaded resources in the TPM */
|
||||
err = tpm_get_capability(TPM_CAP_HANDLE, type, buf,
|
||||
err = tpm_get_capability(dev, TPM_CAP_HANDLE, type, buf,
|
||||
sizeof(buf));
|
||||
if (err) {
|
||||
printf("tpm_get_capability returned error %d.\n", err);
|
||||
|
|
Loading…
Reference in a new issue