summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm-dev.h
diff options
context:
space:
mode:
authorTadeusz Struk2018-09-10 19:18:28 +0200
committerJarkko Sakkinen2018-10-05 12:47:33 +0200
commitc3d477a725ef6b3d17609d5dafc644cccc070cb9 (patch)
tree055f6c7df57171b6d79e2d6e8891e01361885f80 /drivers/char/tpm/tpm-dev.h
parenttpm: Make SECURITYFS a weak dependency (diff)
downloadkernel-qcow2-linux-c3d477a725ef6b3d17609d5dafc644cccc070cb9.tar.gz
kernel-qcow2-linux-c3d477a725ef6b3d17609d5dafc644cccc070cb9.tar.xz
kernel-qcow2-linux-c3d477a725ef6b3d17609d5dafc644cccc070cb9.zip
tpm: add ptr to the tpm_space struct to file_priv
Add a ptr to struct tpm_space to the file_priv and consolidate of the write operations for the two interfaces. Signed-off-by: Tadeusz Struk <tadeusz.struk@intel.com> Tested-by: Philip Tricca <philip.b.tricca@intel.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Signed-off--by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers/char/tpm/tpm-dev.h')
-rw-r--r--drivers/char/tpm/tpm-dev.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm-dev.h b/drivers/char/tpm/tpm-dev.h
index b24cfb4d3ee1..4048677bbd78 100644
--- a/drivers/char/tpm/tpm-dev.h
+++ b/drivers/char/tpm/tpm-dev.h
@@ -6,6 +6,7 @@
struct file_priv {
struct tpm_chip *chip;
+ struct tpm_space *space;
/* Data passed to and from the tpm via the read/write calls */
size_t data_pending;
@@ -18,11 +19,11 @@ struct file_priv {
};
void tpm_common_open(struct file *file, struct tpm_chip *chip,
- struct file_priv *priv);
+ struct file_priv *priv, struct tpm_space *space);
ssize_t tpm_common_read(struct file *file, char __user *buf,
size_t size, loff_t *off);
ssize_t tpm_common_write(struct file *file, const char __user *buf,
- size_t size, loff_t *off, struct tpm_space *space);
+ size_t size, loff_t *off);
void tpm_common_release(struct file *file, struct file_priv *priv);
#endif