diff options
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2016-11-14 05:00:50 -0500 |
---|---|---|
committer | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2016-11-28 01:31:31 +0200 |
commit | cd9b7631a888f6615dac148c10d72a253b98c64b (patch) | |
tree | fea727e138e62c981c51158e450f0df4612223ea /drivers/char/tpm/tpm.h | |
parent | b1a9b7b602c5320ab3827a3f6a6a5211826308c4 (diff) | |
download | linux-cd9b7631a888f6615dac148c10d72a253b98c64b.tar.gz linux-cd9b7631a888f6615dac148c10d72a253b98c64b.tar.bz2 linux-cd9b7631a888f6615dac148c10d72a253b98c64b.zip |
tpm: replace dynamically allocated bios_dir with a static array
This commit is based on a commit by Nayna Jain. Replaced dynamically
allocated bios_dir with a static array as the size is always constant.
Suggested-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r-- | drivers/char/tpm/tpm.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index f9401ca0454c..9d69580a9743 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -40,6 +40,7 @@ enum tpm_const { TPM_BUFSIZE = 4096, TPM_NUM_DEVICES = 65536, TPM_RETRY = 50, /* 5 seconds */ + TPM_NUM_EVENT_LOG_FILES = 3, }; enum tpm_timeout { @@ -171,7 +172,7 @@ struct tpm_chip { unsigned long duration[3]; /* jiffies */ bool duration_adjusted; - struct dentry **bios_dir; + struct dentry *bios_dir[TPM_NUM_EVENT_LOG_FILES]; const struct attribute_group *groups[3]; unsigned int groups_cnt; |