aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.c
diff options
context:
space:
mode:
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 7c4133582dba..0b3af3fe6766 100644
--- a/drivers/char/tpm/tpm.c
+++ b/drivers/char/tpm/tpm.c
@@ -986,7 +986,7 @@ int tpm_release(struct inode *inode, struct file *file)
986 struct tpm_chip *chip = file->private_data; 986 struct tpm_chip *chip = file->private_data;
987 987
988 del_singleshot_timer_sync(&chip->user_read_timer); 988 del_singleshot_timer_sync(&chip->user_read_timer);
989 flush_scheduled_work(); 989 flush_work_sync(&chip->work);
990 file->private_data = NULL; 990 file->private_data = NULL;
991 atomic_set(&chip->data_pending, 0); 991 atomic_set(&chip->data_pending, 0);
992 kfree(chip->data_buffer); 992 kfree(chip->data_buffer);
@@ -1038,7 +1038,7 @@ ssize_t tpm_read(struct file *file, char __user *buf,
1038 ssize_t ret_size; 1038 ssize_t ret_size;
1039 1039
1040 del_singleshot_timer_sync(&chip->user_read_timer); 1040 del_singleshot_timer_sync(&chip->user_read_timer);
1041 flush_scheduled_work(); 1041 flush_work_sync(&chip->work);
1042 ret_size = atomic_read(&chip->data_pending); 1042 ret_size = atomic_read(&chip->data_pending);
1043 atomic_set(&chip->data_pending, 0); 1043 atomic_set(&chip->data_pending, 0);
1044 if (ret_size > 0) { /* relay data */ 1044 if (ret_size > 0) { /* relay data */