diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-01 23:20:20 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-03-01 23:20:20 +0000 |
commit | 8d3c3ddfa85837e24fad6fa39318617cbb59e843 (patch) | |
tree | f699dcaac2a11f0c9506ad111ae39fd5e3617c2d /drivers/char/tpm/tpm.c | |
parent | e8b2c3c47a53348aebbbeb5322e32937df958793 (diff) | |
parent | 6927faf30920b8c03dfa007e732642a1f1f20089 (diff) |
Merge branch 'drm-intel-fixes' into drm-intel-next
Diffstat (limited to 'drivers/char/tpm/tpm.c')
-rw-r--r-- | drivers/char/tpm/tpm.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c index 36e0fa161c2..1f46f1cd922 100644 --- a/drivers/char/tpm/tpm.c +++ b/drivers/char/tpm/tpm.c @@ -364,14 +364,12 @@ unsigned long tpm_calc_ordinal_duration(struct tpm_chip *chip, tpm_protected_ordinal_duration[ordinal & TPM_PROTECTED_ORDINAL_MASK]; - if (duration_idx != TPM_UNDEFINED) { + if (duration_idx != TPM_UNDEFINED) duration = chip->vendor.duration[duration_idx]; - /* if duration is 0, it's because chip->vendor.duration wasn't */ - /* filled yet, so we set the lowest timeout just to give enough */ - /* time for tpm_get_timeouts() to succeed */ - return (duration <= 0 ? HZ : duration); - } else + if (duration <= 0) return 2 * 60 * HZ; + else + return duration; } EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration); |