Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1400100 > unrolled thread

Re: [PATCH v2] tpm: Fix suspend regression

Started byJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
First post2016-05-12 16:00 +0200
Last post2016-05-12 16:00 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH v2] tpm: Fix suspend regression Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-05-12 16:00 +0200
    Re: [PATCH v2] tpm: Fix suspend regression Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com> - 2016-05-12 16:00 +0200

#1400100 — Re: [PATCH v2] tpm: Fix suspend regression

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2016-05-12 16:00 +0200
SubjectRe: [PATCH v2] tpm: Fix suspend regression
Message-ID<rxZjH-75z-7@gated-at.bofh.it>
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
> 

[toc] | [next] | [standalone]


#1400102

FromJarkko Sakkinen <jarkko.sakkinen@linux.intel.com>
Date2016-05-12 16:00 +0200
Message-ID<rxZjI-75z-13@gated-at.bofh.it>
In reply to#1400100
On Thu, May 12, 2016 at 04:49:52PM +0300, Jarkko Sakkinen wrote:
> 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>

Merged to next.

/Jarkko

> /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
> > 

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web