linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefan Berger <stefanb@linux.vnet.ibm.com>
To: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>,
	Jarkko Sakkinen <jarkko.sakkinen@linux.intel.com>,
	tpmdd-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [tpmdd-devel] [PATCH 2/3] tpm: Get rid of chip->pdev
Date: Sat, 13 Feb 2016 10:39:11 -0500	[thread overview]
Message-ID: <56BF4E1F.2030208@linux.vnet.ibm.com> (raw)
In-Reply-To: <1455321871-28296-3-git-send-email-jgunthorpe@obsidianresearch.com>

On 02/12/2016 07:04 PM, Jason Gunthorpe wrote:
> This is a hold over from before the struct device conversion.
>
> - All prints should be using &chip->dev, which is the Linux
>    standard. This changes prints to use tpm0 as the device name,
>    not the PnP/etc ID.
> - The few places involving sysfs/modules that really do need the
>    parent just use chip->dev.parent instead
> - We no longer need to get_device(pdev) in any places since it is no
>    longer used by any of the code. The kref on the parent is held
>    by the device core during device_add and dropped in device_del
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
> ---

> @@ -347,8 +347,8 @@ static int i2c_nuvoton_recv(struct tpm_chip *chip, u8 *buf, size_t count)
>    */
>   static int i2c_nuvoton_send(struct tpm_chip *chip, u8 *buf, size_t len)
>   {
> -	struct device *dev = chip->pdev;
> -	struct i2c_client *client = to_i2c_client(dev);
> +	struct device *dev = &chip->dev;
This looks wrong or are you fixing a bug here? chip->dev.parent ?
> +	struct i2c_client *client = to_i2c_client(chip->dev.parent);

Does this need to be replaced ?

     Stefan

  parent reply	other threads:[~2016-02-13 15:39 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-13  0:04 [PATCH 0/3] Various struct device cleanups Jason Gunthorpe
2016-02-13  0:04 ` [PATCH 1/3] tpm: Hold the kref during tpm_chip_find_get Jason Gunthorpe
2016-02-13 10:08   ` Jarkko Sakkinen
2016-02-13 15:45     ` Jason Gunthorpe
2016-02-14  4:55   ` Jarkko Sakkinen
2016-02-14  6:50     ` Jason Gunthorpe
2016-02-14  8:02       ` Jarkko Sakkinen
2016-02-13  0:04 ` [PATCH 2/3] tpm: Get rid of chip->pdev Jason Gunthorpe
     [not found]   ` <201602130037.u1D0bDEN029756@d01av04.pok.ibm.com>
2016-02-13  1:11     ` Jason Gunthorpe
     [not found]       ` <201602130128.u1D1S2Xn006955@d01av05.pok.ibm.com>
2016-02-13  2:00         ` Jason Gunthorpe
2016-02-13  3:33         ` Jason Gunthorpe
2016-02-14  5:24           ` Jarkko Sakkinen
2016-02-14  6:57             ` Jason Gunthorpe
2016-02-14  8:03               ` Jarkko Sakkinen
2016-02-13 15:39   ` Stefan Berger [this message]
2016-02-14  7:06     ` [tpmdd-devel] " Jason Gunthorpe
2016-02-14  5:13   ` Jarkko Sakkinen
2016-02-13  0:04 ` [PATCH 3/3] tpm: Get rid of devname Jason Gunthorpe
2016-02-13  1:01   ` kbuild test robot
2016-02-13  1:13     ` Jason Gunthorpe
2016-02-14  5:16   ` 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=56BF4E1F.2030208@linux.vnet.ibm.com \
    --to=stefanb@linux.vnet.ibm.com \
    --cc=jarkko.sakkinen@linux.intel.com \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=linux-kernel@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).