aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.c
diff options
context:
space:
mode:
authorJames Morris <jmorris@namei.org>2011-01-09 17:46:24 -0500
committerJames Morris <jmorris@namei.org>2011-01-09 17:46:24 -0500
commitd2e7ad19229f982fc1eb731827d82ceac90abfb3 (patch)
tree98a3741b4d4b27a48b3c7ea9babe331e539416a8 /drivers/char/tpm/tpm.c
parentd03a5d888fb688c832d470b749acc5ed38e0bc1d (diff)
parent0c21e3aaf6ae85bee804a325aa29c325209180fd (diff)
Merge branch 'master' into next
Conflicts: security/smack/smack_lsm.c Verified and added fix by Stephen Rothwell <sfr@canb.auug.org.au> Ok'd by Casey Schaufler <casey@schaufler-ca.com> Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'drivers/char/tpm/tpm.c')
-rw-r--r--drivers/char/tpm/tpm.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm.c b/drivers/char/tpm/tpm.c
index 068bac858b4a..1f46f1cd9225 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -1002,7 +1002,7 @@ int tpm_release(struct inode *inode, struct file *file)
1002 struct tpm_chip *chip = file->private_data; 1002 struct tpm_chip *chip = file->private_data;
1003 1003
1004 del_singleshot_timer_sync(&chip->user_read_timer); 1004 del_singleshot_timer_sync(&chip->user_read_timer);
1005 flush_scheduled_work(); 1005 flush_work_sync(&chip->work);
1006 file->private_data = NULL; 1006 file->private_data = NULL;
1007 atomic_set(&chip->data_pending, 0); 1007 atomic_set(&chip->data_pending, 0);
1008 kfree(chip->data_buffer); 1008 kfree(chip->data_buffer);
@@ -1054,7 +1054,7 @@ ssize_t tpm_read(struct file *file, char __user *buf,
1054 ssize_t ret_size; 1054 ssize_t ret_size;
1055 1055
1056 del_singleshot_timer_sync(&chip->user_read_timer); 1056 del_singleshot_timer_sync(&chip->user_read_timer);
1057 flush_scheduled_work(); 1057 flush_work_sync(&chip->work);
1058 ret_size = atomic_read(&chip->data_pending); 1058 ret_size = atomic_read(&chip->data_pending);
1059 atomic_set(&chip->data_pending, 0); 1059 atomic_set(&chip->data_pending, 0);
1060 if (ret_size > 0) { /* relay data */ 1060 if (ret_size > 0) { /* relay data */