From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Peter Huewe <peterhuewe@gmx.de>
Cc: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
Marcel Selhorst <tpmdd@selhorst.net>,
Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
tpmdd-devel@lists.sourceforge.net (moderated list:TPM DEVICE
DRIVER), linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h
Date: Sat, 3 Sep 2016 00:48:03 +0300 [thread overview]
Message-ID: <1472852886-7640-1-git-send-email-jarkko.sakkinen@linux.intel.com> (raw)
The struct tpm_class_ops is not used outside the TPM driver. Thus,
it can be safely move to drivers/char/tpm/tpm.h.
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
---
drivers/char/tpm/tpm.h | 13 +++++++++++++
include/linux/tpm.h | 14 --------------
2 files changed, 13 insertions(+), 14 deletions(-)
diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
index 3e952fb..e1d277d 100644
--- a/drivers/char/tpm/tpm.h
+++ b/drivers/char/tpm/tpm.h
@@ -138,6 +138,19 @@ enum tpm2_startup_types {
#define TPM_PPI_VERSION_LEN 3
+struct tpm_class_ops {
+ unsigned int flags;
+ const u8 req_complete_mask;
+ const u8 req_complete_val;
+ bool (*req_canceled)(struct tpm_chip *chip, u8 status);
+ int (*recv) (struct tpm_chip *chip, u8 *buf, size_t len);
+ int (*send) (struct tpm_chip *chip, u8 *buf, size_t len);
+ void (*cancel) (struct tpm_chip *chip);
+ u8 (*status) (struct tpm_chip *chip);
+ bool (*update_timeouts)(struct tpm_chip *chip,
+ unsigned long *timeout_cap);
+};
+
enum tpm_chip_flags {
TPM_CHIP_FLAG_REGISTERED = BIT(0),
TPM_CHIP_FLAG_TPM2 = BIT(1),
diff --git a/include/linux/tpm.h b/include/linux/tpm.h
index da158f0..76ba592 100644
--- a/include/linux/tpm.h
+++ b/include/linux/tpm.h
@@ -37,20 +37,6 @@ enum TPM_OPS_FLAGS {
TPM_OPS_AUTO_STARTUP = BIT(0),
};
-struct tpm_class_ops {
- unsigned int flags;
- const u8 req_complete_mask;
- const u8 req_complete_val;
- bool (*req_canceled)(struct tpm_chip *chip, u8 status);
- int (*recv) (struct tpm_chip *chip, u8 *buf, size_t len);
- int (*send) (struct tpm_chip *chip, u8 *buf, size_t len);
- void (*cancel) (struct tpm_chip *chip);
- u8 (*status) (struct tpm_chip *chip);
- bool (*update_timeouts)(struct tpm_chip *chip,
- unsigned long *timeout_cap);
-
-};
-
#if defined(CONFIG_TCG_TPM) || defined(CONFIG_TCG_TPM_MODULE)
extern int tpm_is_tpm2(u32 chip_num);
--
2.7.4
next reply other threads:[~2016-09-02 21:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-09-02 21:48 Jarkko Sakkinen [this message]
2016-09-02 22:11 ` Jason Gunthorpe
2016-09-02 22:35 ` Jarkko Sakkinen
2016-09-02 22:45 ` Jason Gunthorpe
2016-09-03 6:22 ` Jarkko Sakkinen
2016-09-03 6:26 ` Jarkko Sakkinen
2016-09-04 20:14 ` Jason Gunthorpe
2016-09-05 5:44 ` Jarkko Sakkinen
2016-09-05 17:44 ` Jason Gunthorpe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1472852886-7640-1-git-send-email-jarkko.sakkinen@linux.intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peterhuewe@gmx.de \
--cc=tpmdd-devel@lists.sourceforge.net \
--cc=tpmdd@selhorst.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome