diff options
author | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> | 2013-11-26 15:30:43 -0500 |
---|---|---|
committer | Peter Huewe <peterhuewe@gmx.de> | 2014-01-06 08:37:25 -0500 |
commit | 01ad1fa75dd243909d62dba25a93254b20d5fe81 (patch) | |
tree | f7a09e61ead8f9e0a1002dde7e53d0376b8b3c19 /drivers/char/tpm/tpm_tis.c | |
parent | 1e3b73a95793555860512008035f6822406a2a79 (diff) |
tpm: Create a tpm_class_ops structure and use it in the drivers
This replaces the static initialization of a tpm_vendor_specific
structure in the drivers with the standard Linux idiom of providing
a const structure of function pointers.
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
Reviewed-by: Ashley Lai <adlai@linux.vnet.ibm.com>
[phuewe: did apply manually due to commit
191ffc6bde3 tpm/tpm_i2c_atmel: fix coccinelle warnings]
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to 'drivers/char/tpm/tpm_tis.c')
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index a362edec58d4..8094b081a8be 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c | |||
@@ -432,7 +432,7 @@ static bool tpm_tis_req_canceled(struct tpm_chip *chip, u8 status) | |||
432 | } | 432 | } |
433 | } | 433 | } |
434 | 434 | ||
435 | static struct tpm_vendor_specific tpm_tis = { | 435 | static const struct tpm_class_ops tpm_tis = { |
436 | .status = tpm_tis_status, | 436 | .status = tpm_tis_status, |
437 | .recv = tpm_tis_recv, | 437 | .recv = tpm_tis_recv, |
438 | .send = tpm_tis_send, | 438 | .send = tpm_tis_send, |