summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKylene Jo Hall <kjhall@us.ibm.com>2005-11-18 01:10:57 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-11-18 07:49:45 -0800
commitba3961152e7016237e15e3dfc18f08c1853d156b (patch)
treeeef7380031f0e267ce78499f66b04edc2e51a0aa /drivers
parent966cc04b4d9d3d7a49e744888628acc36ebec5d4 (diff)
downloadblackbird-op-linux-ba3961152e7016237e15e3dfc18f08c1853d156b.tar.gz
blackbird-op-linux-ba3961152e7016237e15e3dfc18f08c1853d156b.zip
[PATCH] tpm: use flush_scheduled_work()
Add the necessary flush_schedule_work calls when canceling the timer. Signed-off-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')
-rw-r--r--drivers/char/tpm/tpm.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index 0b283d246730..a9be0e8eaea5 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -377,6 +377,7 @@ int tpm_release(struct inode *inode, struct file *file)
file->private_data = NULL;
chip->num_opens--;
del_singleshot_timer_sync(&chip->user_read_timer);
+ flush_scheduled_work();
atomic_set(&chip->data_pending, 0);
put_device(chip->dev);
kfree(chip->data_buffer);
@@ -428,6 +429,7 @@ ssize_t tpm_read(struct file * file, char __user *buf,
int ret_size;
del_singleshot_timer_sync(&chip->user_read_timer);
+ flush_scheduled_work();
ret_size = atomic_read(&chip->data_pending);
atomic_set(&chip->data_pending, 0);
if (ret_size > 0) { /* relay data */
OpenPOWER on IntegriCloud