tpm: rename chip->dev to chip->pdev
Rename chip->dev to chip->pdev to make it explicit that this not the character device but actually represents the platform device. Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Reviewed-by: Jasob Gunthorpe <jason.gunthorpe@obsidianresearch.com> Reviewed-by: Stefan Berger <stefanb@linux.vnet.ibm.com> Reviewed-by: Peter Huewe <peterhuewe@gmx.de> Tested-by: Scot Doyle <lkml14@scotdoyle.com> Tested-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
This commit is contained in:

gecommit door
Peter Huewe

bovenliggende
0dc5536521
commit
71ed848fd7
@@ -63,7 +63,7 @@ static int tpm_open(struct inode *inode, struct file *file)
|
||||
* by the check of is_open variable, which is protected
|
||||
* by driver_lock. */
|
||||
if (test_and_set_bit(0, &chip->is_open)) {
|
||||
dev_dbg(chip->dev, "Another process owns this TPM\n");
|
||||
dev_dbg(chip->pdev, "Another process owns this TPM\n");
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
@@ -81,7 +81,7 @@ static int tpm_open(struct inode *inode, struct file *file)
|
||||
INIT_WORK(&priv->work, timeout_work);
|
||||
|
||||
file->private_data = priv;
|
||||
get_device(chip->dev);
|
||||
get_device(chip->pdev);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -168,7 +168,7 @@ static int tpm_release(struct inode *inode, struct file *file)
|
||||
file->private_data = NULL;
|
||||
atomic_set(&priv->data_pending, 0);
|
||||
clear_bit(0, &priv->chip->is_open);
|
||||
put_device(priv->chip->dev);
|
||||
put_device(priv->chip->pdev);
|
||||
kfree(priv);
|
||||
return 0;
|
||||
}
|
||||
@@ -193,12 +193,12 @@ int tpm_dev_add_device(struct tpm_chip *chip)
|
||||
chip->vendor.miscdev.minor = MISC_DYNAMIC_MINOR;
|
||||
|
||||
chip->vendor.miscdev.name = chip->devname;
|
||||
chip->vendor.miscdev.parent = chip->dev;
|
||||
chip->vendor.miscdev.parent = chip->pdev;
|
||||
|
||||
rc = misc_register(&chip->vendor.miscdev);
|
||||
if (rc) {
|
||||
chip->vendor.miscdev.name = NULL;
|
||||
dev_err(chip->dev,
|
||||
dev_err(chip->pdev,
|
||||
"unable to misc_register %s, minor %d err=%d\n",
|
||||
chip->vendor.miscdev.name,
|
||||
chip->vendor.miscdev.minor, rc);
|
||||
|
Verwijs in nieuw issue
Block a user