From: Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
To: Stefan Berger <stefanb@linux.vnet.ibm.com>
Cc: tpmdd-devel@lists.sourceforge.net, jmmahler@gmail.com,
jgunthorpe@obsidianresearch.com,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] tpm: Fix suspend regression
Date: Thu, 12 May 2016 16:49:53 +0300 [thread overview]
Message-ID: <20160512134952.GA13575@intel.com> (raw)
In-Reply-To: <1462980507-21682-1-git-send-email-stefanb@linux.vnet.ibm.com>
On Wed, May 11, 2016 at 11:28:27AM -0400, Stefan Berger wrote:
> Fix the suspend regression due to the wrong way of retrieving the
> chip structure. The suspend functions are attached to the hardware
> device, not the chip and thus must rely on drvdata.
>
> Fixes: e89f8b1ade9cc1a ("tpm: Remove all uses of drvdata from the TPM Core")
> Reported-by: Jeremiah Mahler <jmmahler@gmail.com>
> Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Tested-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
> Reviewed-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> Tested-by: Jeremiah Mahler <jmmahler@gmail.com>
Acked-by: Jarkko Sakkinen <jarkko.sakkine@linux.intel.com>
/Jarkko
> ---
> drivers/char/tpm/tpm-interface.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
> index 080dade..5e3c1b6 100644
> --- a/drivers/char/tpm/tpm-interface.c
> +++ b/drivers/char/tpm/tpm-interface.c
> @@ -934,7 +934,7 @@ static struct tpm_input_header savestate_header = {
> */
> int tpm_pm_suspend(struct device *dev)
> {
> - struct tpm_chip *chip = to_tpm_chip(dev);
> + struct tpm_chip *chip = dev_get_drvdata(dev);
> struct tpm_cmd_t cmd;
> int rc, try;
>
> @@ -995,7 +995,7 @@ EXPORT_SYMBOL_GPL(tpm_pm_suspend);
> */
> int tpm_pm_resume(struct device *dev)
> {
> - struct tpm_chip *chip = to_tpm_chip(dev);
> + struct tpm_chip *chip = dev_get_drvdata(dev);
>
> if (chip == NULL)
> return -ENODEV;
> --
> 2.4.3
>
next parent reply other threads:[~2016-05-12 13:50 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1462980507-21682-1-git-send-email-stefanb@linux.vnet.ibm.com>
2016-05-12 13:49 ` Jarkko Sakkinen [this message]
2016-05-12 13:58 ` [PATCH v2] tpm: Fix suspend regression Jarkko Sakkinen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160512134952.GA13575@intel.com \
--to=jarkko.sakkinen@linux.intel.com \
--cc=jgunthorpe@obsidianresearch.com \
--cc=jmmahler@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=stefanb@linux.vnet.ibm.com \
--cc=tpmdd-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox