From patchwork Sat Jun 25 21:44:50 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarkko Sakkinen X-Patchwork-Id: 640578 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 3rcTK84vzdz9t0G for ; Sun, 26 Jun 2016 07:45:48 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=sfs-ml-2.v29.ch3.sourceforge.com) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bGvOb-0007n6-PJ; Sat, 25 Jun 2016 21:45:45 +0000 Received: from sog-mx-2.v43.ch3.sourceforge.com ([172.29.43.192] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1bGvOa-0007n1-O8 for tpmdd-devel@lists.sourceforge.net; Sat, 25 Jun 2016 21:45:44 +0000 X-ACL-Warn: Received: from mga01.intel.com ([192.55.52.88]) by sog-mx-2.v43.ch3.sourceforge.com with esmtp (Exim 4.76) id 1bGvOY-00036m-U2 for tpmdd-devel@lists.sourceforge.net; Sat, 25 Jun 2016 21:45:44 +0000 Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 25 Jun 2016 14:45:34 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,528,1459839600"; d="scan'208";a="995063304" Received: from mzonis-mobl1.ger.corp.intel.com (HELO localhost) ([10.252.1.221]) by fmsmga001.fm.intel.com with ESMTP; 25 Jun 2016 14:45:29 -0700 From: Jarkko Sakkinen To: Peter Huewe , Jason Gunthorpe Date: Sun, 26 Jun 2016 00:44:50 +0300 Message-Id: <1466891093-27766-6-git-send-email-jarkko.sakkinen@linux.intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1466891093-27766-1-git-send-email-jarkko.sakkinen@linux.intel.com> References: <1466891093-27766-1-git-send-email-jarkko.sakkinen@linux.intel.com> X-Spam-Score: -1.4 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.4 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: 1bGvOY-00036m-U2 Cc: open list , linux-security-module@vger.kernel.org, "moderated list:TPM DEVICE DRIVER" Subject: [tpmdd-devel] [PATCH v2 5/6] tpm: rename tpm_pcr_read_dev() to tpm1_pcr_read() 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 Gave more consistent name tpm1_pcr_read() as the TPM2 version is called tpm2_pcr_read(). Signed-off-by: Jarkko Sakkinen --- drivers/char/tpm/tpm-interface.c | 4 ++-- drivers/char/tpm/tpm-sysfs.c | 2 +- drivers/char/tpm/tpm.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c index 4aeacf3..3995f5c 100644 --- a/drivers/char/tpm/tpm-interface.c +++ b/drivers/char/tpm/tpm-interface.c @@ -670,7 +670,7 @@ static struct tpm_input_header pcrread_header = { .ordinal = TPM_ORDINAL_PCRREAD }; -int tpm_pcr_read_dev(struct tpm_chip *chip, int pcr_idx, u8 *res_buf) +int tpm1_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf) { int rc; struct tpm_cmd_t cmd; @@ -732,7 +732,7 @@ int tpm_pcr_read(u32 chip_num, int pcr_idx, u8 *res_buf) if (chip->flags & TPM_CHIP_FLAG_TPM2) rc = tpm2_pcr_read(chip, pcr_idx, res_buf); else - rc = tpm_pcr_read_dev(chip, pcr_idx, res_buf); + rc = tpm1_pcr_read(chip, pcr_idx, res_buf); tpm_put_ops(chip); return rc; } diff --git a/drivers/char/tpm/tpm-sysfs.c b/drivers/char/tpm/tpm-sysfs.c index b46cf70..a89d0e2 100644 --- a/drivers/char/tpm/tpm-sysfs.c +++ b/drivers/char/tpm/tpm-sysfs.c @@ -101,7 +101,7 @@ static ssize_t pcrs_show(struct device *dev, struct device_attribute *attr, num_pcrs = be32_to_cpu(cap.num_pcrs); for (i = 0; i < num_pcrs; i++) { - rc = tpm_pcr_read_dev(chip, i, digest); + rc = tpm1_pcr_read(chip, i, digest); if (rc) break; str += sprintf(str, "PCR-%02d: ", i); diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 8153f93..9b34e3b 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -504,7 +504,7 @@ void tpm_chip_unregister(struct tpm_chip *chip); void tpm_sysfs_add_device(struct tpm_chip *chip); -int tpm_pcr_read_dev(struct tpm_chip *chip, int pcr_idx, u8 *res_buf); +int tpm1_pcr_read(struct tpm_chip *chip, int pcr_idx, u8 *res_buf); #ifdef CONFIG_ACPI extern void tpm_add_ppi(struct tpm_chip *chip);