diff options
author | Len Brown <len.brown@intel.com> | 2011-03-18 18:06:08 -0400 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2011-03-18 18:06:08 -0400 |
commit | 05534c9ffc9d5d950b14de8ba49a7609dc59b0b8 (patch) | |
tree | 65a01a1e0bc0e28c64fb5105cc763949f5412b4b /drivers/char/tpm/tpm.c | |
parent | dd87cc53c42f3260b7eb7f60822de0fa9e58af59 (diff) | |
parent | 589c7a39ae2f2b74fd13ae344ca1dcca61da6bca (diff) |
Merge branch 'acpica' into release
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); |