From patchwork Wed Mar 23 20:17:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Ricard X-Patchwork-Id: 601364 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 3qVgpz49x7z9sBg for ; Thu, 24 Mar 2016 07:17:47 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=sfs-ml-3.v29.ch3.sourceforge.com) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1aipDn-0002eR-EK; Wed, 23 Mar 2016 20:17:39 +0000 Received: from sog-mx-4.v43.ch3.sourceforge.com ([172.29.43.194] helo=mx.sourceforge.net) by sfs-ml-3.v29.ch3.sourceforge.com with esmtp (Exim 4.76) (envelope-from ) id 1aipDm-0002eL-3O for tpmdd-devel@lists.sourceforge.net; Wed, 23 Mar 2016 20:17:38 +0000 Received-SPF: pass (sog-mx-4.v43.ch3.sourceforge.com: domain of gmail.com designates 74.125.82.66 as permitted sender) client-ip=74.125.82.66; envelope-from=christophe.ricard@gmail.com; helo=mail-wm0-f66.google.com; Received: from mail-wm0-f66.google.com ([74.125.82.66]) by sog-mx-4.v43.ch3.sourceforge.com with esmtps (TLSv1:RC4-SHA:128) (Exim 4.76) id 1aipDk-0007xt-Eb for tpmdd-devel@lists.sourceforge.net; Wed, 23 Mar 2016 20:17:38 +0000 Received: by mail-wm0-f66.google.com with SMTP id u125so7040725wmg.0 for ; Wed, 23 Mar 2016 13:17:36 -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=WrYTzpkgDWE6pSwMSEpDmXqvsj8nNR23+2IquHCwgF0=; b=jxU3nlsetcKgHjQFLClowp+K4uvNmDaNG8fiNDr9EZw/hiWVY2q9/pxM60bvv0heE4 56akmM2h0NCZBlfFR2yQTG+Ywt75JnBiK7HBrAapmiLhRFzMT4dsk44X4duNU9SOGabH XCXDe0Q4kQrnvKd3JPuR2/+9Wkihn6sYxfqRln8BIDbHstF6CUH03I8syc3YlyWzL7DW 8UGAOXTg/OTi4D4s96JUqNRP54Mmx1ZVCr3k6rbsfQNYz+WdhicVX1cMhwrdWRjJp2It xnLc+VfE4kJYTjBmCAZeih2h3e6urNM6b4a5CioDUDZ4ZjFRv91183mohX/D9S8gJskb js/g== X-Gm-Message-State: AD7BkJIq1Gh3LsuWzmq6LXqgL2YdKRZ21ovoeFZ0trNJTH0MbtQ20NKk3VGRkpHdOmsRHQ== X-Received: by 10.28.12.134 with SMTP id 128mr26731685wmm.18.1458764250411; Wed, 23 Mar 2016 13:17:30 -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 xx3sm4155165wjc.32.2016.03.23.13.17.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 23 Mar 2016 13:17:29 -0700 (PDT) From: Christophe Ricard X-Google-Original-From: Christophe Ricard To: jarkko.sakkinen@linux.intel.com Date: Wed, 23 Mar 2016 21:17:18 +0100 Message-Id: <1458764240-24185-4-git-send-email-christophe-h.ricard@st.com> X-Mailer: git-send-email 2.5.0 In-Reply-To: <1458764240-24185-1-git-send-email-christophe-h.ricard@st.com> References: <1458764240-24185-1-git-send-email-christophe-h.ricard@st.com> X-Spam-Score: -1.6 (-) X-Spam-Report: Spam Filtering performed by mx.sourceforge.net. See http://spamassassin.org/tag/ for more details. -1.5 SPF_CHECK_PASS SPF reports sender host as permitted sender for sender-domain 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (christophe.ricard[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-Headers-End: 1aipDk-0007xt-Eb 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 3/5] tpm: Move priv field from tpm_vendor_specific to tpm_chip 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 Move from tpm_vendor_specific priv field to tpm_chip as this is going to be used for additional tpm_chip description. Signed-off-by: Christophe Ricard --- drivers/char/tpm/tpm.h | 4 ++-- drivers/char/tpm/tpm_atmel.c | 12 +++++----- drivers/char/tpm/tpm_atmel.h | 2 +- drivers/char/tpm/tpm_crb.c | 12 +++++----- drivers/char/tpm/tpm_i2c_atmel.c | 12 +++++----- drivers/char/tpm/tpm_i2c_nuvoton.c | 8 +++---- drivers/char/tpm/tpm_nsc.c | 4 ++-- drivers/char/tpm/tpm_tis.c | 46 +++++++++++++++++++------------------- 8 files changed, 50 insertions(+), 50 deletions(-) diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h index 357ac14..06d5c2a 100644 --- a/drivers/char/tpm/tpm.h +++ b/drivers/char/tpm/tpm.h @@ -138,12 +138,11 @@ struct tpm_vendor_specific { bool timeout_adjusted; unsigned long duration[3]; /* jiffies */ bool duration_adjusted; - void *priv; wait_queue_head_t read_queue; }; -#define TPM_VPRIV(c) ((c)->vendor.priv) +#define TPM_VPRIV(c) ((c)->priv) #define TPM_VID_INTEL 0x8086 #define TPM_VID_WINBOND 0x1050 @@ -159,6 +158,7 @@ enum tpm_chip_flags { struct tpm_chip { struct device dev; struct cdev cdev; + void *priv; /* A driver callback under ops cannot be run unless ops_sem is held * (sometimes implicitly, eg for the sysfs code). ops becomes null diff --git a/drivers/char/tpm/tpm_atmel.c b/drivers/char/tpm/tpm_atmel.c index 242d6c6..56845bf 100644 --- a/drivers/char/tpm/tpm_atmel.c +++ b/drivers/char/tpm/tpm_atmel.c @@ -44,7 +44,7 @@ struct tpm_atmel_priv { static int tpm_atml_recv(struct tpm_chip *chip, u8 *buf, size_t count) { - struct tpm_atmel_priv *priv = chip->vendor.priv; + struct tpm_atmel_priv *priv = chip->priv; u8 status, *hdr = buf; u32 size; int i; @@ -103,7 +103,7 @@ static int tpm_atml_recv(struct tpm_chip *chip, u8 *buf, size_t count) static int tpm_atml_send(struct tpm_chip *chip, u8 *buf, size_t count) { - struct tpm_atmel_priv *priv = chip->vendor.priv; + struct tpm_atmel_priv *priv = chip->priv; int i; dev_dbg(&chip->dev, "tpm_atml_send:\n"); @@ -117,14 +117,14 @@ static int tpm_atml_send(struct tpm_chip *chip, u8 *buf, size_t count) static void tpm_atml_cancel(struct tpm_chip *chip) { - struct tpm_atmel_priv *priv = chip->vendor.priv; + struct tpm_atmel_priv *priv = chip->priv; iowrite8(ATML_STATUS_ABORT, priv->iobase + 1); } static u8 tpm_atml_status(struct tpm_chip *chip) { - struct tpm_atmel_priv *priv = chip->vendor.priv; + struct tpm_atmel_priv *priv = chip->priv; return ioread8(priv->iobase + 1); } @@ -149,7 +149,7 @@ static struct platform_device *pdev; static void atml_plat_remove(void) { struct tpm_chip *chip = dev_get_drvdata(&pdev->dev); - struct tpm_atmel_priv *priv = chip->vendor.priv; + struct tpm_atmel_priv *priv = chip->priv; if (chip) { tpm_chip_unregister(chip); @@ -214,7 +214,7 @@ static int __init init_atmel(void) goto err_unreg_dev; } - chip->vendor.priv = priv; + chip->priv = priv; rc = tpm_chip_register(chip); if (rc) diff --git a/drivers/char/tpm/tpm_atmel.h b/drivers/char/tpm/tpm_atmel.h index 08607a6..dedc5dc 100644 --- a/drivers/char/tpm/tpm_atmel.h +++ b/drivers/char/tpm/tpm_atmel.h @@ -22,7 +22,7 @@ * */ -#define atmel_get_priv(chip) ((struct tpm_atmel_priv *) chip->vendor.priv) +#define atmel_get_priv(chip) ((struct tpm_atmel_priv *) chip->priv) #ifdef CONFIG_PPC64 diff --git a/drivers/char/tpm/tpm_crb.c b/drivers/char/tpm/tpm_crb.c index 8767da6..0e81a36 100644 --- a/drivers/char/tpm/tpm_crb.c +++ b/drivers/char/tpm/tpm_crb.c @@ -87,7 +87,7 @@ static SIMPLE_DEV_PM_OPS(crb_pm, tpm_pm_suspend, tpm_pm_resume); static u8 crb_status(struct tpm_chip *chip) { - struct crb_priv *priv = chip->vendor.priv; + struct crb_priv *priv = chip->priv; u8 sts = 0; if ((ioread32(&priv->cca->start) & CRB_START_INVOKE) != @@ -99,7 +99,7 @@ static u8 crb_status(struct tpm_chip *chip) static int crb_recv(struct tpm_chip *chip, u8 *buf, size_t count) { - struct crb_priv *priv = chip->vendor.priv; + struct crb_priv *priv = chip->priv; unsigned int expected; /* sanity check */ @@ -139,7 +139,7 @@ static int crb_do_acpi_start(struct tpm_chip *chip) static int crb_send(struct tpm_chip *chip, u8 *buf, size_t len) { - struct crb_priv *priv = chip->vendor.priv; + struct crb_priv *priv = chip->priv; int rc = 0; if (len > ioread32(&priv->cca->cmd_size)) { @@ -163,7 +163,7 @@ static int crb_send(struct tpm_chip *chip, u8 *buf, size_t len) static void crb_cancel(struct tpm_chip *chip) { - struct crb_priv *priv = chip->vendor.priv; + struct crb_priv *priv = chip->priv; iowrite32(cpu_to_le32(CRB_CANCEL_INVOKE), &priv->cca->cancel); @@ -175,7 +175,7 @@ static void crb_cancel(struct tpm_chip *chip) static bool crb_req_canceled(struct tpm_chip *chip, u8 status) { - struct crb_priv *priv = chip->vendor.priv; + struct crb_priv *priv = chip->priv; u32 cancel = ioread32(&priv->cca->cancel); return (cancel & CRB_CANCEL_INVOKE) == CRB_CANCEL_INVOKE; @@ -200,7 +200,7 @@ static int crb_init(struct acpi_device *device, struct crb_priv *priv) if (IS_ERR(chip)) return PTR_ERR(chip); - chip->vendor.priv = priv; + chip->priv = priv; chip->acpi_dev_handle = device->handle; chip->flags = TPM_CHIP_FLAG_TPM2; diff --git a/drivers/char/tpm/tpm_i2c_atmel.c b/drivers/char/tpm/tpm_i2c_atmel.c index dd8f0eb..92cd080 100644 --- a/drivers/char/tpm/tpm_i2c_atmel.c +++ b/drivers/char/tpm/tpm_i2c_atmel.c @@ -51,7 +51,7 @@ struct priv_data { static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; struct i2c_client *client = to_i2c_client(chip->dev.parent); s32 status; @@ -70,7 +70,7 @@ static int i2c_atmel_send(struct tpm_chip *chip, u8 *buf, size_t len) static int i2c_atmel_recv(struct tpm_chip *chip, u8 *buf, size_t count) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; struct i2c_client *client = to_i2c_client(chip->dev.parent); struct tpm_output_header *hdr = (struct tpm_output_header *)priv->buffer; @@ -111,7 +111,7 @@ static void i2c_atmel_cancel(struct tpm_chip *chip) static u8 i2c_atmel_read_status(struct tpm_chip *chip) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; struct i2c_client *client = to_i2c_client(chip->dev.parent); int rc; @@ -163,9 +163,9 @@ static int i2c_atmel_probe(struct i2c_client *client, if (IS_ERR(chip)) return PTR_ERR(chip); - chip->vendor.priv = devm_kzalloc(dev, sizeof(struct priv_data), - GFP_KERNEL); - if (!chip->vendor.priv) + chip->priv = devm_kzalloc(dev, sizeof(struct priv_data), + GFP_KERNEL); + if (!chip->priv) return -ENOMEM; /* Default timeouts */ diff --git a/drivers/char/tpm/tpm_i2c_nuvoton.c b/drivers/char/tpm/tpm_i2c_nuvoton.c index a43b5f3..a9c6b2d 100644 --- a/drivers/char/tpm/tpm_i2c_nuvoton.c +++ b/drivers/char/tpm/tpm_i2c_nuvoton.c @@ -178,7 +178,7 @@ static int i2c_nuvoton_wait_for_stat(struct tpm_chip *chip, u8 mask, u8 value, { if (chip->vendor.irq && queue) { s32 rc; - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; unsigned int cur_intrs = priv->intrs; enable_irq(chip->vendor.irq); @@ -473,7 +473,7 @@ static const struct tpm_class_ops tpm_i2c = { static irqreturn_t i2c_nuvoton_int_handler(int dummy, void *dev_id) { struct tpm_chip *chip = dev_id; - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; priv->intrs++; wake_up(&chip->vendor.read_queue); @@ -534,9 +534,9 @@ static int i2c_nuvoton_probe(struct i2c_client *client, if (IS_ERR(chip)) return PTR_ERR(chip); - chip->vendor.priv = devm_kzalloc(dev, sizeof(struct priv_data), + chip->priv = devm_kzalloc(dev, sizeof(struct priv_data), GFP_KERNEL); - if (!chip->vendor.priv) + if (!chip->priv) return -ENOMEM; init_waitqueue_head(&chip->vendor.read_queue); diff --git a/drivers/char/tpm/tpm_nsc.c b/drivers/char/tpm/tpm_nsc.c index 8ccb1d5..48cc7ff 100644 --- a/drivers/char/tpm/tpm_nsc.c +++ b/drivers/char/tpm/tpm_nsc.c @@ -69,7 +69,7 @@ struct tpm_nsc_priv { unsigned long base; }; -#define tpm_nsc_get_priv(chip) ((struct tpm_nsc_priv *) chip->vendor.priv) +#define tpm_nsc_get_priv(chip) ((struct tpm_nsc_priv *) chip->priv) /* * Wait for a certain status to appear @@ -331,7 +331,7 @@ static int __init init_nsc(void) goto err_rel_reg; } - chip->vendor.priv = priv; + chip->priv = priv; rc = tpm_chip_register(chip); if (rc) diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index 19dac62..96cb824 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -129,7 +129,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; unsigned long stop = jiffies + chip->vendor.timeout_a; do { if (ioread8(priv->iobase + TPM_ACCESS(l)) & @@ -142,7 +142,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; if ((ioread8(priv->iobase + TPM_ACCESS(l)) & (TPM_ACCESS_ACTIVE_LOCALITY | TPM_ACCESS_VALID)) == @@ -154,7 +154,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; if (force || (ioread8(priv->iobase + TPM_ACCESS(l)) & (TPM_ACCESS_REQUEST_PENDING | TPM_ACCESS_VALID)) == @@ -165,7 +165,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; unsigned long stop, timeout; long rc; @@ -206,7 +206,7 @@ again: static u8 tpm_tis_status(struct tpm_chip *chip) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; return ioread8(priv->iobase + TPM_STS(chip->vendor.locality)); @@ -214,7 +214,7 @@ static u8 tpm_tis_status(struct tpm_chip *chip) static void tpm_tis_ready(struct tpm_chip *chip) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; /* this causes the current command to be aborted */ iowrite8(TPM_STS_COMMAND_READY, @@ -223,7 +223,7 @@ static void tpm_tis_ready(struct tpm_chip *chip) static int get_burstcount(struct tpm_chip *chip) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; unsigned long stop; int burstcnt; @@ -245,7 +245,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; int size = 0, burstcnt; while (size < count && wait_for_tpm_stat(chip, @@ -264,7 +264,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; int size = 0; int expected, status; @@ -320,7 +320,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; int rc, status, burstcnt; size_t count = 0; @@ -376,7 +376,7 @@ out_err: static void disable_interrupts(struct tpm_chip *chip) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; u32 intmask; intmask = @@ -396,7 +396,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; int rc; u32 ordinal; unsigned long dur; @@ -434,7 +434,7 @@ out_err: static int tpm_tis_send(struct tpm_chip *chip, u8 *buf, size_t len) { int rc, irq; - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; if (!chip->vendor.irq || priv->irq_tested) return tpm_tis_send_main(chip, buf, len); @@ -466,7 +466,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; int i; u32 did_vid; @@ -490,7 +490,7 @@ static bool tpm_tis_update_timeouts(struct tpm_chip *chip, */ static int probe_itpm(struct tpm_chip *chip) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; int rc = 0; u8 cmd_getticks[] = { 0x00, 0xc1, 0x00, 0x00, 0x00, 0x0a, @@ -532,7 +532,7 @@ out: static bool tpm_tis_req_canceled(struct tpm_chip *chip, u8 status) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; switch (priv->manufacturer_id) { case TPM_VID_WINBOND: @@ -559,7 +559,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; u32 interrupt; int i; @@ -569,7 +569,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) if (interrupt == 0) return IRQ_NONE; - ((struct priv_data *)chip->vendor.priv)->irq_tested = true; + ((struct priv_data *)chip->priv)->irq_tested = true; if (interrupt & TPM_INTF_DATA_AVAIL_INT) wake_up_interruptible(&chip->vendor.read_queue); if (interrupt & TPM_INTF_LOCALITY_CHANGE_INT) @@ -596,7 +596,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; u8 original_int_vec; if (devm_request_irq(&chip->dev, irq, tis_int_handler, flags, @@ -649,7 +649,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 = chip->vendor.priv; + struct priv_data *priv = chip->priv; u8 original_int_vec; int i; @@ -673,7 +673,7 @@ MODULE_PARM_DESC(interrupts, "Enable interrupts"); static void tpm_tis_remove(struct tpm_chip *chip) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; if (chip->flags & TPM_CHIP_FLAG_TPM2) tpm2_shutdown(chip, TPM2_SU_CLEAR); @@ -702,7 +702,7 @@ static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info, if (IS_ERR(chip)) return PTR_ERR(chip); - chip->vendor.priv = priv; + chip->priv = priv; #ifdef CONFIG_ACPI chip->acpi_dev_handle = acpi_dev_handle; #endif @@ -841,7 +841,7 @@ out_err: #ifdef CONFIG_PM_SLEEP static void tpm_tis_reenable_interrupts(struct tpm_chip *chip) { - struct priv_data *priv = chip->vendor.priv; + struct priv_data *priv = chip->priv; u32 intmask; /* reenable interrupts that device may have lost or