diff options
author | Rajiv Andrade <srajiv@linux.vnet.ibm.com> | 2011-09-16 13:34:37 -0400 |
---|---|---|
committer | Rajiv Andrade <srajiv@linux.vnet.ibm.com> | 2011-11-16 06:43:50 -0500 |
commit | 9efa54f002cc03fdb4e9d8d508aa996af01c48d0 (patch) | |
tree | 439ffe314d78264c15b58bb1f9202b09243c8659 /drivers/char/tpm | |
parent | a927b8131794ee449b7f6666e7ab61301949b20f (diff) |
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/tpm')
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 10 |
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, | |||
201 | u8 status; | 201 | u8 status; |
202 | 202 | ||
203 | /* check current status */ | 203 | /* check current status */ |
204 | status = tpm_tis_status(chip); | 204 | status = chip->vendor.status(chip); |
205 | if ((status & mask) == mask) | 205 | if ((status & mask) == mask) |
206 | return 0; | 206 | return 0; |
207 | 207 | ||
@@ -213,9 +213,9 @@ again: | |||
213 | if ((long)timeout <= 0) | 213 | if ((long)timeout <= 0) |
214 | return -ETIME; | 214 | return -ETIME; |
215 | rc = wait_event_interruptible_timeout(*queue, | 215 | rc = wait_event_interruptible_timeout(*queue, |
216 | ((tpm_tis_status | 216 | ((chip->vendor.status(chip) |
217 | (chip) & mask) == | 217 | & mask) == mask), |
218 | mask), timeout); | 218 | timeout); |
219 | if (rc > 0) | 219 | if (rc > 0) |
220 | return 0; | 220 | return 0; |
221 | if (rc == -ERESTARTSYS && freezing(current)) { | 221 | if (rc == -ERESTARTSYS && freezing(current)) { |
@@ -225,7 +225,7 @@ again: | |||
225 | } else { | 225 | } else { |
226 | do { | 226 | do { |
227 | msleep(TPM_TIMEOUT); | 227 | msleep(TPM_TIMEOUT); |
228 | status = tpm_tis_status(chip); | 228 | status = chip->vendor.status(chip); |
229 | if ((status & mask) == mask) | 229 | if ((status & mask) == mask) |
230 | return 0; | 230 | return 0; |
231 | } while (time_before(jiffies, stop)); | 231 | } while (time_before(jiffies, stop)); |