diff options
author | Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> | 2014-12-12 22:46:36 +0300 |
---|---|---|
committer | Peter Huewe <peterhuewe@gmx.de> | 2015-01-17 16:00:09 +0300 |
commit | 71ed848fd791bc0b53a1b7a04f29eb9e994c7cbb (patch) | |
tree | 415a3e0afdc68aa03598441005b3d60850fb5d6f /drivers/char/tpm/tpm-dev.c | |
parent | 0dc553652102c55a43eb1ab52e2049e478469f53 (diff) | |
download | linux-71ed848fd791bc0b53a1b7a04f29eb9e994c7cbb.tar.xz |
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>
Diffstat (limited to 'drivers/char/tpm/tpm-dev.c')
-rw-r--r-- | drivers/char/tpm/tpm-dev.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/char/tpm/tpm-dev.c b/drivers/char/tpm/tpm-dev.c index d9b774e02a1f..356832146788 100644 --- a/drivers/char/tpm/tpm-dev.c +++ b/drivers/char/tpm/tpm-dev.c @@ -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); |