Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 232266
b: refs/heads/master
c: c4ff4b8
h: refs/heads/master
v: v3
  • Loading branch information
Rajiv Andrade authored and James Morris committed Jan 24, 2011
1 parent ff01f8e commit d3eb2d2
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 5403110943a2dcf1f96416d7a412a8b46895facd
refs/heads/master: c4ff4b829ef9e6353c0b133b7adb564a68054979
10 changes: 6 additions & 4 deletions trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -364,12 +364,14 @@ 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 <= 0)
/* 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
return 2 * 60 * HZ;
else
return duration;
}
EXPORT_SYMBOL_GPL(tpm_calc_ordinal_duration);

Expand Down

0 comments on commit d3eb2d2

Please sign in to comment.