All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Peter Hüwe" <PeterHuewe-Mmb7MZpHnFY@public.gmane.org>
To: Christophe Ricard
	<christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: ashley-fm2HMyfA2y6tG0bUXCXiUA@public.gmane.org,
	tpmdd-yWjUBOtONefk1uMJSBkQmQ@public.gmane.org,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org,
	christophe-h.ricard-qxv4g6HH51o@public.gmane.org,
	jean-luc.blanc-qxv4g6HH51o@public.gmane.org,
	benoit.houyere-qxv4g6HH51o@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org,
	jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org
Subject: Re: [PATCH v2 04/10] tpm/tpm_i2c_stm_st33: Replace access to io_lpcpd from struct st33zp24_platform_data to tpm_stm_dev
Date: Sat, 17 Jan 2015 14:44:47 +0100	[thread overview]
Message-ID: <201501171444.49175.PeterHuewe@gmx.de> (raw)
In-Reply-To: <1421187198-8503-5-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>

Am Dienstag, 13. Januar 2015, 23:13:12 schrieb Christophe Ricard:
> io_lpcpd is accessible from struct tpm_stm_dev.
> struct st33zp24_platform_data is only valid when using static platform
> configuration data, not when using dts.
> 
> Reviewed-by: Jasob Gunthorpe <jason.gunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
> Signed-off-by: Christophe Ricard <christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
> ---
>  drivers/char/tpm/tpm_i2c_stm_st33.c | 16 ++++++++++------
>  1 file changed, 10 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/char/tpm/tpm_i2c_stm_st33.c
> b/drivers/char/tpm/tpm_i2c_stm_st33.c index d12d507..9d3c9c8 100644
> --- a/drivers/char/tpm/tpm_i2c_stm_st33.c
> +++ b/drivers/char/tpm/tpm_i2c_stm_st33.c
> @@ -834,11 +834,14 @@ static int tpm_stm_i2c_remove(struct i2c_client
> *client) */
>  static int tpm_stm_i2c_pm_suspend(struct device *dev)
>  {
> -	struct st33zp24_platform_data *pin_infos = dev->platform_data;
> +	struct tpm_chip *chip = dev_get_drvdata(dev);
> +	struct tpm_stm_dev *tpm_dev;
>  	int ret = 0;
> 
> -	if (gpio_is_valid(pin_infos->io_lpcpd))
> -		gpio_set_value(pin_infos->io_lpcpd, 0);
> +	tpm_dev = (struct tpm_stm_dev *)TPM_VPRIV(chip);
> +
> +	if (gpio_is_valid(tpm_dev->io_lpcpd))
> +		gpio_set_value(tpm_dev->io_lpcpd, 0);
>  	else
>  		ret = tpm_pm_suspend(dev);

patch is not self contained and fails to build.

drivers/char/tpm/tpm_i2c_stm_st33.c: In function 'tpm_stm_i2c_pm_resume':
drivers/char/tpm/tpm_i2c_stm_st33.c:864:20: error: 'pin_infos' undeclared 
(first use in this function)
  if (gpio_is_valid(pin_infos->io_lpcpd)) {
                    ^
drivers/char/tpm/tpm_i2c_stm_st33.c:864:20: note: each undeclared identifier 
is reported only once for each function it appears in
scripts/Makefile.build:263: recipe for target 
'drivers/char/tpm/tpm_i2c_stm_st33.o' failed
make[3]: *** [drivers/char/tpm/tpm_i2c_stm_st33.o] Error 1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-01-17 13:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13 22:13 [PATCH v2 00/10] st33zp24 new architecture proposal and st33zp24 spi driver Christophe Ricard
     [not found] ` <1421187198-8503-1-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-01-13 22:13   ` [PATCH v2 01/10] tpm/tpm_i2c_stm_st33: Remove sparse spaces Christophe Ricard
2015-01-13 22:13   ` [PATCH v2 02/10] tpm/tpm_i2c_stm_st33: Sanity cleanup Christophe Ricard
2015-01-13 22:13   ` [PATCH v2 03/10] tpm/tpm_i2c_stm_st33: Replace remaining r by ret Christophe Ricard
2015-01-13 22:13   ` [PATCH v2 04/10] tpm/tpm_i2c_stm_st33: Replace access to io_lpcpd from struct st33zp24_platform_data to tpm_stm_dev Christophe Ricard
     [not found]     ` <1421187198-8503-5-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-01-17 13:44       ` Peter Hüwe [this message]
2015-01-13 22:13   ` [PATCH v2 05/10] tpm/tpm_i2c_stm_st33: Change tpm_i2c_stm_st33.h to tpm_stm_st33.h Christophe Ricard
2015-01-13 22:13   ` [PATCH v2 06/10] tpm/tpm_i2c_stm_st33: Add status check when reading data on the FIFO Christophe Ricard
2015-01-13 22:13   ` [PATCH v2 07/10] tpm/tpm_i2c_stm_st33/dts/st33zp24-i2c: Rename st33zp24 dts documentation Christophe Ricard
2015-01-13 22:13   ` [PATCH v2 08/10] tpm/tpm_i2c_stm_st33: Split tpm_i2c_tpm_st33 in 2 layers (core + phy) Christophe Ricard
     [not found]     ` <1421187198-8503-9-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-01-17 13:32       ` Peter Hüwe
2015-01-13 22:13   ` [PATCH v2 09/10] tpm/st33zp24/spi: Add st33zp24 spi phy Christophe Ricard
     [not found]     ` <1421187198-8503-10-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-01-17 13:29       ` Peter Hüwe
2015-01-13 22:13   ` [PATCH v2 10/10] tpm/st33zp24/dts/st33zp24-spi: Add dts documentation for " Christophe Ricard
     [not found]     ` <1421187198-8503-11-git-send-email-christophe-h.ricard-qxv4g6HH51o@public.gmane.org>
2015-01-17 13:20       ` Peter Hüwe
2015-01-17 13:22   ` [PATCH v2 00/10] st33zp24 new architecture proposal and st33zp24 spi driver Peter Hüwe
2015-01-17 14:08   ` Peter Hüwe

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=201501171444.49175.PeterHuewe@gmx.de \
    --to=peterhuewe-mmb7mzphnfy@public.gmane.org \
    --cc=ashley-fm2HMyfA2y6tG0bUXCXiUA@public.gmane.org \
    --cc=benoit.houyere-qxv4g6HH51o@public.gmane.org \
    --cc=christophe-h.ricard-qxv4g6HH51o@public.gmane.org \
    --cc=christophe.ricard-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=jarkko.sakkinen-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
    --cc=jean-luc.blanc-qxv4g6HH51o@public.gmane.org \
    --cc=jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org \
    --cc=tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=tpmdd-yWjUBOtONefk1uMJSBkQmQ@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.