summaryrefslogtreecommitdiff
path: root/drivers/char/tpm/tpmrm-dev.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-10-25 23:25:18 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2018-10-25 23:25:18 +0300
commit52ff0779d6cfcce24c0204c22b0b4899dc55449d (patch)
tree76bc30ca328f4f6263426b6d5b1c530f91164eb7 /drivers/char/tpm/tpmrm-dev.c
parent57ce66d39f10fb01efabd72b14eb033deddb226b (diff)
parentb8d7b758145252e60ea0198e531a8b00a75b8895 (diff)
downloadlinux-52ff0779d6cfcce24c0204c22b0b4899dc55449d.tar.xz
Merge branch 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull TPM updates from James Morris: "From Jarkko: The only new feature is non-blocking operation for /dev/tpm0" * 'next-tpm' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: tpm: Restore functionality to xen vtpm driver. tpm: add support for nonblocking operation tpm: add ptr to the tpm_space struct to file_priv tpm: Make SECURITYFS a weak dependency tpm: suppress transmit cmd error logs when TPM 1.2 is disabled/deactivated tpm: fix response size validation in tpm_get_random()
Diffstat (limited to 'drivers/char/tpm/tpmrm-dev.c')
-rw-r--r--drivers/char/tpm/tpmrm-dev.c15
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/char/tpm/tpmrm-dev.c b/drivers/char/tpm/tpmrm-dev.c
index 1a0e97a5da5a..0c751a79bbed 100644
--- a/drivers/char/tpm/tpmrm-dev.c
+++ b/drivers/char/tpm/tpmrm-dev.c
@@ -28,7 +28,7 @@ static int tpmrm_open(struct inode *inode, struct file *file)
return -ENOMEM;
}
- tpm_common_open(file, chip, &priv->priv);
+ tpm_common_open(file, chip, &priv->priv, &priv->space);
return 0;
}
@@ -45,21 +45,12 @@ static int tpmrm_release(struct inode *inode, struct file *file)
return 0;
}
-static ssize_t tpmrm_write(struct file *file, const char __user *buf,
- size_t size, loff_t *off)
-{
- struct file_priv *fpriv = file->private_data;
- struct tpmrm_priv *priv = container_of(fpriv, struct tpmrm_priv, priv);
-
- return tpm_common_write(file, buf, size, off, &priv->space);
-}
-
const struct file_operations tpmrm_fops = {
.owner = THIS_MODULE,
.llseek = no_llseek,
.open = tpmrm_open,
.read = tpm_common_read,
- .write = tpmrm_write,
+ .write = tpm_common_write,
+ .poll = tpm_common_poll,
.release = tpmrm_release,
};
-