summaryrefslogtreecommitdiffstats
path: root/drivers/char/tpm/tpm.h
diff options
context:
space:
mode:
authorWinkler, Tomas <tomas.winkler@intel.com>2018-03-05 13:48:26 +0100
committerJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>2018-03-23 09:18:06 +0100
commit62c09e12bbf887d01397323888d5fe89a215a7e2 (patch)
tree71d507a2eab993e70c2c7d4ba64dfa874777d992 /drivers/char/tpm/tpm.h
parenttpm: tpm-interface: fix tpm_transmit/_cmd kdoc (diff)
downloadlinux-62c09e12bbf887d01397323888d5fe89a215a7e2.tar.xz
linux-62c09e12bbf887d01397323888d5fe89a215a7e2.zip
tpm: fix buffer type in tpm_transmit_cmd
1. The buffer cannot be const as it is used both for send and receive. 2. Drop useless casting to u8 *, as this is already a type of 'buf' parameter, it has just masked the 'const' issue. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> Tested-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.h')
-rw-r--r--drivers/char/tpm/tpm.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index f895fba4e20d..b0ee61e5d414 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -506,7 +506,7 @@ enum tpm_transmit_flags {
ssize_t tpm_transmit(struct tpm_chip *chip, struct tpm_space *space,
u8 *buf, size_t bufsiz, unsigned int flags);
ssize_t tpm_transmit_cmd(struct tpm_chip *chip, struct tpm_space *space,
- const void *buf, size_t bufsiz,
+ void *buf, size_t bufsiz,
size_t min_rsp_body_length, unsigned int flags,
const char *desc);
int tpm_startup(struct tpm_chip *chip);