From patchwork Sat Apr 16 06:35:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 8861121 Return-Path: X-Original-To: patchwork-tpmdd-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id BC6D69F1D3 for ; Sat, 16 Apr 2016 06:36:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5BAE92024D for ; Sat, 16 Apr 2016 06:36:04 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id D86AA20221 for ; Sat, 16 Apr 2016 06:36:02 +0000 (UTC) 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 1arJpp-0001fz-3q; Sat, 16 Apr 2016 06:36:01 +0000 Received: from sog-mx-3.v43.ch3.sourceforge.com ([172.29.43.193] helo=mx.sourceforge.net) by sfs-ml-2.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1arJpo-0001fs-7O for tpmdd-devel@lists.sourceforge.net; Sat, 16 Apr 2016 06:36:00 +0000 Received-SPF: pass (sog-mx-3.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.43 as permitted sender) client-ip=74.125.82.43; envelope-from=christophe.ricard@gmail.com; helo=mail-wm0-f43.google.com; Received: from mail-wm0-f43.google.com ([74.125.82.43]) by sog-mx-3.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1arJpm-0007kq-ST for tpmdd-devel@lists.sourceforge.net; Sat, 16 Apr 2016 06:36:00 +0000 Received: by mail-wm0-f43.google.com with SMTP id a140so56224945wma.0 for ; Fri, 15 Apr 2016 23:35:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=y/ByZYHMuGKi3aXqnydkKX/2SGkRgimKBiV9XyM8xpI=; b=l/DTNX7TwPpF8loF3zbFFm2lkgi8HhdZw17bAiJqrbV1/5vPCVSeiuiJKGCAnGMgFM tR+mhO/B7/UjKAd/7zB37DHDR2YTubb8ltuHmHnoLLea75ojBaGyNKMyhCZYp3NsDzR4 rSJcg4MZw6vUM/MZ9EY2V0zFKuBnZjWkBVOxKywPeZtWgRPnPGTlz8RssV/+CVoZVmRQ r86lnn9DjWiIE8TUfejaXBB/Rlk33COF6++ZyRr868MIMheuXjYsruFw44ofsOoQhMN+ KSdPj1aLnB7oJLV/wbqGIyTJpGJjqpYizirZT9s4OlD24YVIFk8Fv3bA9T2l9loz40Dt 4nDw== X-Gm-Message-State: AOPr4FUG4yNCbCfPugANljAFXUXm1GHcdoJXdbzDNoyyqk0zMsmPPsnavGJEdQDO1o8piw== X-Received: by 10.194.174.231 with SMTP id bv7mr25308075wjc.17.1460788552740; Fri, 15 Apr 2016 23:35:52 -0700 (PDT) Received: from localhost.localdomain (ax113-6-78-236-204-66.fbx.proxad.net. [78.236.204.66]) by smtp.gmail.com with ESMTPSA id wr2sm52541996wjc.49.2016.04.15.23.35.50 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 15 Apr 2016 23:35:51 -0700 (PDT) From: Christophe Ricard X-Google-Original-From: Christophe Ricard To: jarkko.sakkinen@linux.intel.com Date: Sat, 16 Apr 2016 08:35:33 +0200 Message-Id: <1460788542-2455-4-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1460788542-2455-1-git-send-email-christophe-h.ricard@st.com> References: <1460788542-2455-1-git-send-email-christophe-h.ricard@st.com> X-Spam-Score: -1.6 (-) X-Headers-End: 1arJpm-0007kq-ST Cc: jean-luc.blanc@st.com, ashley@ashleylai.com, tpmdd-devel@lists.sourceforge.net, christophe-h.ricard@st.com, benoit.houyere@st.com Subject: [tpmdd-devel] [PATCH v3 03/12] tpm: tpm_tis: Rename priv_data structure tpm_tis_data 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 X-Spam-Status: No, score=-7.9 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,HK_RANDOM_ENVFROM,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP For code sanity rename priv_data tpm_tis_data. Signed-off-by: Christophe Ricard --- drivers/char/tpm/tpm_tis.c | 44 ++++++++++++++++++++--------------------- drivers/char/tpm/tpm_tis_core.h | 2 +- 2 files changed, 23 insertions(+), 23 deletions(-) diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 7d5d2d2..af53747 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -95,7 +95,7 @@ struct tpm_info { #define TPM_RID(l) (0x0F04 | ((l) << 12)) struct tpm_tis_lpc_phy { - struct priv_data priv; + struct tpm_tis_data priv; void __iomem *iobase; }; @@ -131,7 +131,7 @@ static inline int is_itpm(struct acpi_device *dev) * correct values in the other bits.' */ static int wait_startup(struct tpm_chip *chip, int l) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); unsigned long stop = jiffies + chip->timeout_a; do { @@ -145,7 +145,7 @@ static int wait_startup(struct tpm_chip *chip, int l) static int check_locality(struct tpm_chip *chip, int l) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); if ((ioread8(phy->iobase + TPM_ACCESS(l)) & @@ -158,7 +158,7 @@ static int check_locality(struct tpm_chip *chip, int l) static void release_locality(struct tpm_chip *chip, int l, int force) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); if (force || (ioread8(phy->iobase + TPM_ACCESS(l)) & @@ -170,7 +170,7 @@ static void release_locality(struct tpm_chip *chip, int l, int force) static int request_locality(struct tpm_chip *chip, int l) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); unsigned long stop, timeout; long rc; @@ -212,7 +212,7 @@ again: static u8 tpm_tis_status(struct tpm_chip *chip) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); return ioread8(phy->iobase + @@ -221,7 +221,7 @@ static u8 tpm_tis_status(struct tpm_chip *chip) static void tpm_tis_ready(struct tpm_chip *chip) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); /* this causes the current command to be aborted */ @@ -231,7 +231,7 @@ static void tpm_tis_ready(struct tpm_chip *chip) static int get_burstcount(struct tpm_chip *chip) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); unsigned long stop; int burstcnt; @@ -254,7 +254,7 @@ static int get_burstcount(struct tpm_chip *chip) static int recv_data(struct tpm_chip *chip, u8 *buf, size_t count) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); int size = 0, burstcnt; while (size < count && @@ -273,7 +273,7 @@ static int recv_data(struct tpm_chip *chip, u8 *buf, size_t count) static int tpm_tis_recv(struct tpm_chip *chip, u8 *buf, size_t count) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); int size = 0; int expected, status; @@ -329,7 +329,7 @@ MODULE_PARM_DESC(itpm, "Force iTPM workarounds (found on some Lenovo laptops)"); */ static int tpm_tis_send_data(struct tpm_chip *chip, u8 *buf, size_t len) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); int rc, status, burstcnt; size_t count = 0; @@ -386,7 +386,7 @@ out_err: static void disable_interrupts(struct tpm_chip *chip) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); u32 intmask; @@ -408,7 +408,7 @@ static void disable_interrupts(struct tpm_chip *chip) */ static int tpm_tis_send_main(struct tpm_chip *chip, u8 *buf, size_t len) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); int rc; u32 ordinal; @@ -446,7 +446,7 @@ out_err: static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); int rc, irq; if (!(chip->flags & TPM_CHIP_FLAG_IRQ) || priv->irq_tested) @@ -481,7 +481,7 @@ static const struct tis_vendor_timeout_override vendor_timeout_overrides[] = { static bool tpm_tis_update_timeouts(struct tpm_chip *chip, unsigned long *timeout_cap) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); int i; u32 did_vid; @@ -506,7 +506,7 @@ static bool tpm_tis_update_timeouts(struct tpm_chip *chip, */ static int probe_itpm(struct tpm_chip *chip) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); int rc = 0; u8 cmd_getticks[] = { @@ -549,7 +549,7 @@ out: static bool tpm_tis_req_canceled(struct tpm_chip *chip, u8 status) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); switch (priv->manufacturer_id) { case TPM_VID_WINBOND: @@ -576,7 +576,7 @@ static const struct tpm_class_ops tpm_tis = { static irqreturn_t tis_int_handler(int dummy, void *dev_id) { struct tpm_chip *chip = dev_id; - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); u32 interrupt; int i; @@ -614,7 +614,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, int flags, int irq) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); u8 original_int_vec; @@ -668,7 +668,7 @@ static int tpm_tis_probe_irq_single(struct tpm_chip *chip, u32 intmask, */ static void tpm_tis_probe_irq(struct tpm_chip *chip, u32 intmask) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); u8 original_int_vec; int i; @@ -693,7 +693,7 @@ MODULE_PARM_DESC(interrupts, "Enable interrupts"); static void tpm_tis_remove(struct tpm_chip *chip) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); void __iomem *reg = phy->iobase + TPM_INT_ENABLE(priv->locality); @@ -857,7 +857,7 @@ out_err: #ifdef CONFIG_PM_SLEEP static void tpm_tis_reenable_interrupts(struct tpm_chip *chip) { - struct priv_data *priv = dev_get_drvdata(&chip->dev); + struct tpm_tis_data *priv = dev_get_drvdata(&chip->dev); struct tpm_tis_lpc_phy *phy = to_tpm_tis_lpc_phy(priv); u32 intmask; diff --git a/drivers/char/tpm/tpm_tis_core.h b/drivers/char/tpm/tpm_tis_core.h index 6de7986..2260f89 100644 --- a/drivers/char/tpm/tpm_tis_core.h +++ b/drivers/char/tpm/tpm_tis_core.h @@ -25,7 +25,7 @@ #include "tpm.h" -struct priv_data { +struct tpm_tis_data { u16 manufacturer_id; int locality; int irq;