From 700d8bdcd0fa815b08638b1e4d43b66d60cc6a8d Mon Sep 17 00:00:00 2001 From: Nishanth Aravamudan Date: Thu, 23 Jun 2005 22:01:47 -0700 Subject: [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 Acked-by: Kylene Hall Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/char/tpm/tpm.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/char/tpm/tpm.h') diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index de0c796fce8..3c4ee433ec7 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -25,7 +25,7 @@ #include #include -#define TPM_TIMEOUT msecs_to_jiffies(5) +#define TPM_TIMEOUT 5 /* msecs */ /* TPM addresses */ #define TPM_ADDR 0x4E @@ -78,7 +78,6 @@ static inline void tpm_write_index(int index, int value) outb(value & 0xFF, TPM_DATA); } -extern void tpm_time_expired(unsigned long); extern int tpm_lpc_bus_init(struct pci_dev *, u16); extern int tpm_register_hardware(struct pci_dev *, -- cgit v1.2.3