]> git.openfabrics.org - ~shefty/rdma-dev.git/blobdiff - drivers/char/tpm/tpm.c
Merge branch 'tpmdd-next-v3.6' of git://github.com/shpedoikal/linux into for-linus
[~shefty/rdma-dev.git] / drivers / char / tpm / tpm.c
index 4caef331a7053b0665a42f08c00b676c496b6f60..93211df52aab7cef9ad9615e42a7b9d36dea4d6f 100644 (file)
@@ -1168,7 +1168,7 @@ int tpm_release(struct inode *inode, struct file *file)
        struct tpm_chip *chip = file->private_data;
 
        del_singleshot_timer_sync(&chip->user_read_timer);
-       flush_work_sync(&chip->work);
+       flush_work(&chip->work);
        file->private_data = NULL;
        atomic_set(&chip->data_pending, 0);
        kzfree(chip->data_buffer);
@@ -1228,7 +1228,7 @@ ssize_t tpm_read(struct file *file, char __user *buf,
        int rc;
 
        del_singleshot_timer_sync(&chip->user_read_timer);
-       flush_work_sync(&chip->work);
+       flush_work(&chip->work);
        ret_size = atomic_read(&chip->data_pending);
        if (ret_size > 0) {     /* relay data */
                ssize_t orig_ret_size = ret_size;
@@ -1266,6 +1266,7 @@ void tpm_remove_hardware(struct device *dev)
 
        misc_deregister(&chip->vendor.miscdev);
        sysfs_remove_group(&dev->kobj, chip->vendor.attr_group);
+       tpm_remove_ppi(&dev->kobj);
        tpm_bios_log_teardown(chip->bios_dir);
 
        /* write it this way to be explicit (chip->dev == dev) */
@@ -1483,7 +1484,7 @@ struct tpm_chip *tpm_register_hardware(struct device *dev,
                goto put_device;
        }
 
-       if (sys_add_ppi(&dev->kobj)) {
+       if (tpm_add_ppi(&dev->kobj)) {
                misc_deregister(&chip->vendor.miscdev);
                goto put_device;
        }