Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 3067
b: refs/heads/master
c: 5e976d5
h: refs/heads/master
i:
  3065: 3e23b24
  3063: 32a5330
v: v3
  • Loading branch information
Kylene Hall authored and Linus Torvalds committed Jun 24, 2005
1 parent 498bfb7 commit a8f7456
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: d9e5b6bf9cf19e6e9f2825228136ea17bc9a051a
refs/heads/master: 5e976d5557d3dd1e835b8be52e6201556dcfa052
10 changes: 7 additions & 3 deletions trunk/drivers/char/tpm/tpm.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,15 +447,15 @@ EXPORT_SYMBOL_GPL(tpm_open);
int tpm_release(struct inode *inode, struct file *file)
{
struct tpm_chip *chip = file->private_data;

file->private_data = NULL;

spin_lock(&driver_lock);
file->private_data = NULL;
chip->num_opens--;
del_singleshot_timer_sync(&chip->user_read_timer);
atomic_set(&chip->data_pending, 0);

pci_dev_put(chip->pci_dev);
kfree(chip->data_buffer);
spin_unlock(&driver_lock);
return 0;
}

Expand Down Expand Up @@ -665,10 +665,14 @@ int tpm_register_hardware(struct pci_dev *pci_dev,
return -ENODEV;
}

spin_lock(&driver_lock);

pci_set_drvdata(pci_dev, chip);

list_add(&chip->list, &tpm_chip_list);

spin_unlock(&driver_lock);

sysfs_create_group(&pci_dev->dev.kobj, chip->vendor->attr_group);

return 0;
Expand Down

0 comments on commit a8f7456

Please sign in to comment.