[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160214070623.GE9551@obsidianresearch.com>
Date: Sun, 14 Feb 2016 00:06:23 -0700
From: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
To: Stefan Berger <stefanb@...ux.vnet.ibm.com>
Cc: Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>,
tpmdd-devel@...ts.sourceforge.net, linux-kernel@...r.kernel.org
Subject: Re: [tpmdd-devel] [PATCH 2/3] tpm: Get rid of chip->pdev
On Sat, Feb 13, 2016 at 10:39:11AM -0500, Stefan Berger wrote:
> >@@ -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 ?
No, in this function dev is only used for dev_err/etc so it should be
changed, like every other dev_err/etc call in this patch.
Expect for this use:
> >+ struct i2c_client *client = to_i2c_client(chip->dev.parent);
>
> Does this need to be replaced ?
Which must stay as the parent.
Jason
Powered by blists - more mailing lists