summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
authorRajiv Andrade <srajiv@linux.vnet.ibm.com>2011-09-16 19:34:37 +0200
committerRajiv Andrade <srajiv@linux.vnet.ibm.com>2011-11-16 12:43:50 +0100
commit9efa54f002cc03fdb4e9d8d508aa996af01c48d0 (patch)
tree439ffe314d78264c15b58bb1f9202b09243c8659 /drivers/char
parenttpm_tis: add delay after aborting command (diff)
downloadlinux-9efa54f002cc03fdb4e9d8d508aa996af01c48d0.tar.xz
linux-9efa54f002cc03fdb4e9d8d508aa996af01c48d0.zip
TPM: Use vendor specific function for status probe
Moved from using tpm_tis_status() to the vendor specific one in wait_for_stat(). This way other TPM drivers can use it instead of reimplementing another. Signed-off-by: Rajiv Andrade <srajiv@linux.vnet.ibm.com>
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm_tis.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c
index d93bafde3120..e4553eb6e542 100644
--- a/drivers/char/tpm/tpm_tis.c
+++ b/drivers/char/tpm/tpm_tis.c
@@ -201,7 +201,7 @@ static int wait_for_stat(struct tpm_chip *chip, u8 mask, unsigned long timeout,
u8 status;
/* check current status */
- status = tpm_tis_status(chip);
+ status = chip->vendor.status(chip);
if ((status & mask) == mask)
return 0;
@@ -213,9 +213,9 @@ again:
if ((long)timeout <= 0)
return -ETIME;
rc = wait_event_interruptible_timeout(*queue,
- ((tpm_tis_status
- (chip) & mask) ==
- mask), timeout);
+ ((chip->vendor.status(chip)
+ & mask) == mask),
+ timeout);
if (rc > 0)
return 0;
if (rc == -ERESTARTSYS && freezing(current)) {
@@ -225,7 +225,7 @@ again:
} else {
do {
msleep(TPM_TIMEOUT);
- status = tpm_tis_status(chip);
+ status = chip->vendor.status(chip);
if ((status & mask) == mask)
return 0;
} while (time_before(jiffies, stop));