aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.h
diff options
context:
space:
mode:
authorNishanth Aravamudan <nacc@us.ibm.com>2005-06-24 01:01:47 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-06-24 03:05:24 -0400
commit700d8bdcd0fa815b08638b1e4d43b66d60cc6a8d (patch)
treec3defbf1cb77b9290a002cff04e1b2f054dfcb05 /drivers/char/tpm/tpm.h
parent6a94f9209762a6eb286f668e1346ad87985cc765 (diff)
[PATCH] char/tpm: use msleep(), clean-up timers,
The TPM driver unnecessarily uses timers when it simply needs to maintain a maximum delay via time_before(). msleep() is used instead of schedule_timeout() to guarantee the task delays as expected. While compile-testing, I found a typo in the driver, using tpm_chp instead of tpm_chip. Remove the now unused timer callback function and change TPM_TIMEOUT's units to milliseconds. Patch is compile-tested. Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com> Acked-by: Kylene Hall <kjhall@us.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/char/tpm/tpm.h')
-rw-r--r--drivers/char/tpm/tpm.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index de0c796fce80..3c4ee433ec7f 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -25,7 +25,7 @@
25#include <linux/fs.h> 25#include <linux/fs.h>
26#include <linux/miscdevice.h> 26#include <linux/miscdevice.h>
27 27
28#define TPM_TIMEOUT msecs_to_jiffies(5) 28#define TPM_TIMEOUT 5 /* msecs */
29 29
30/* TPM addresses */ 30/* TPM addresses */
31#define TPM_ADDR 0x4E 31#define TPM_ADDR 0x4E
@@ -78,7 +78,6 @@ static inline void tpm_write_index(int index, int value)
78 outb(value & 0xFF, TPM_DATA); 78 outb(value & 0xFF, TPM_DATA);
79} 79}
80 80
81extern void tpm_time_expired(unsigned long);
82extern int tpm_lpc_bus_init(struct pci_dev *, u16); 81extern int tpm_lpc_bus_init(struct pci_dev *, u16);
83 82
84extern int tpm_register_hardware(struct pci_dev *, 83extern int tpm_register_hardware(struct pci_dev *,