diff options
author | Christophe Ricard | 2016-03-31 22:56:57 +0200 |
---|---|---|
committer | Jarkko Sakkinen | 2016-06-25 17:26:35 +0300 |
commit | 6e599f6f261fe61582e6bedcc0aff924ac5da614 (patch) | |
tree | f9b0128a6f7790c348af9bd4d619b38641135b8a /drivers/char/tpm/tpm_tis.c | |
parent | 570a36097f302c0bae4fb5478f1287b9b3626155 (diff) |
tpm: drop 'read_queue' from struct tpm_vendor_specific
Dropped the field 'read_queue' from struct tpm_vendor_specific and make it
available to the various private structures in the drivers.
Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com>
Reviewed-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Signed-off-by: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Diffstat (limited to 'drivers/char/tpm/tpm_tis.c')
-rw-r--r-- | drivers/char/tpm/tpm_tis.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/char/tpm/tpm_tis.c b/drivers/char/tpm/tpm_tis.c index ee511f11805a..38240acbfee6 100644 --- a/drivers/char/tpm/tpm_tis.c +++ b/drivers/char/tpm/tpm_tis.c @@ -99,6 +99,7 @@ struct priv_data { int irq; bool irq_tested; wait_queue_head_t int_queue; + wait_queue_head_t read_queue; }; #if defined(CONFIG_PNP) && defined(CONFIG_ACPI) @@ -252,7 +253,7 @@ static int recv_data(struct tpm_chip *chip, u8 *buf, size_t count) wait_for_tpm_stat(chip, TPM_STS_DATA_AVAIL | TPM_STS_VALID, chip->vendor.timeout_c, - &chip->vendor.read_queue, true) + &priv->read_queue, true) == 0) { burstcnt = get_burstcount(chip); for (; burstcnt > 0 && size < count; burstcnt--) @@ -421,7 +422,7 @@ static int tpm_tis_send_main(struct tpm_chip *chip, u8 *buf, size_t len) if (wait_for_tpm_stat (chip, TPM_STS_DATA_AVAIL | TPM_STS_VALID, dur, - &chip->vendor.read_queue, false) < 0) { + &priv->read_queue, false) < 0) { rc = -ETIME; goto out_err; } @@ -575,7 +576,7 @@ static irqreturn_t tis_int_handler(int dummy, void *dev_id) ((struct priv_data *)chip->vendor.priv)->irq_tested = true; if (interrupt & TPM_INTF_DATA_AVAIL_INT) - wake_up_interruptible(&chip->vendor.read_queue); + wake_up_interruptible(&priv->read_queue); if (interrupt & TPM_INTF_LOCALITY_CHANGE_INT) for (i = 0; i < 5; i++) if (check_locality(chip, i) >= 0) @@ -795,7 +796,7 @@ static int tpm_tis_init(struct device *dev, struct tpm_info *tpm_info, } /* INTERRUPT Setup */ - init_waitqueue_head(&chip->vendor.read_queue); + init_waitqueue_head(&priv->read_queue); init_waitqueue_head(&priv->int_queue); if (interrupts && tpm_info->irq != -1) { if (tpm_info->irq) { |