tpm: Get rid of chip->pdev
[cascardo/linux.git] / drivers / char / tpm / tpm-dev.c
index de0337e..4009765 100644 (file)
@@ -61,7 +61,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->pdev, "Another process owns this TPM\n");
+               dev_dbg(&chip->dev, "Another process owns this TPM\n");
                return -EBUSY;
        }
 
@@ -79,7 +79,6 @@ static int tpm_open(struct inode *inode, struct file *file)
        INIT_WORK(&priv->work, timeout_work);
 
        file->private_data = priv;
-       get_device(chip->pdev);
        return 0;
 }
 
@@ -166,7 +165,6 @@ 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->pdev);
        kfree(priv);
        return 0;
 }