From patchwork Fri Sep 2 21:48:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Sakkinen X-Patchwork-Id: 665339 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.sourceforge.net (lists.sourceforge.net [216.34.181.88]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3sQt6M6xCKz9s3T for ; Sat, 3 Sep 2016 07:48:27 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=sfs-ml-4.v29.ch3.sourceforge.com) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bfwJy-0000mV-Bk; Fri, 02 Sep 2016 21:48:22 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-4.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bfwJx-0000mP-Ct for tpmdd-devel@lists.sourceforge.net; Fri, 02 Sep 2016 21:48:21 +0000 X-ACL-Warn: Received: from mga05.intel.com ([192.55.52.43]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) id 1bfwJw-0005cA-BL for tpmdd-devel@lists.sourceforge.net; Fri, 02 Sep 2016 21:48:21 +0000 Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga105.fm.intel.com with ESMTP; 02 Sep 2016 14:48:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.30,272,1470726000"; d="scan'208";a="4575308" Received: from ataghour-mobl8.ger.corp.intel.com (HELO localhost) ([10.252.20.149]) by orsmga004.jf.intel.com with ESMTP; 02 Sep 2016 14:48:11 -0700 From: Jarkko Sakkinen To: Peter Huewe Date: Sat, 3 Sep 2016 00:48:03 +0300 Message-Id: <1472852886-7640-1-git-send-email-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.7.4 X-Spam-Score: -1.5 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 RP_MATCHES_RCVD Envelope sender domain matches handover relay domain 0.0 AWL AWL: Adjusted score from AWL reputation of From: address X-Headers-End: 1bfwJw-0005cA-BL Cc: "moderated list:TPM DEVICE DRIVER" , open list Subject: [tpmdd-devel] [PATCH] tpm: move struct tpm_class_ops to drivers/char/tpm/tpm.h X-BeenThere: tpmdd-devel@lists.sourceforge.net X-Mailman-Version: 2.1.9 Precedence: list List-Id: Tpm Device Driver maintainance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: tpmdd-devel-bounces@lists.sourceforge.net 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 --- 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);