[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1380939244.23565.6.camel@fishsauce>
Date: Fri, 04 Oct 2013 21:14:04 -0500
From: Ashley Lai <adlai@...ux.vnet.ibm.com>
To: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
Cc: tpmdd-devel@...ts.sourceforge.net,
Leonidas Da Silva Barbosa <leosilva@...ux.vnet.ibm.com>,
linux-kernel@...r.kernel.org, Rajiv Andrade <mail@...jiv.net>,
Sirrix AG <tpmdd@...rix.com>
Subject: Re: [tpmdd-devel] [PATCH 06/13] tpm: Remove redundant
dev_set_drvdata
On Mon, 2013-09-23 at 12:14 -0600, Jason Gunthorpe wrote:
> TPM drivers should not call dev_set_drvdata (or aliases), only the core
> code is allowed to call dev_set_drvdata, and it does it during
> tpm_register_hardware.
>
> These extra sets are harmless, but are an anti-pattern that many drivers
> have copied.
>
> Signed-off-by: Jason Gunthorpe <jgunthorpe@...idianresearch.com>
> diff --git a/drivers/char/tpm/tpm_spi_stm_st33.c b/drivers/char/tpm/tpm_spi_stm_st33.c
> index 8d3e8e2..f5e3cd6 100644
> --- a/drivers/char/tpm/tpm_spi_stm_st33.c
> +++ b/drivers/char/tpm/tpm_spi_stm_st33.c
> @@ -779,7 +779,6 @@ tpm_st33_spi_probe(struct spi_device *dev)
> tpm_get_timeouts(chip);
>
> /* attach chip datas to client */
Looks good except this comment needs to be removed. Since this driver
is not merged, please remove this line in the new driver.
> - spi_set_drvdata(dev, chip);
> platform_data->bchipf = false;
>
Acked-by: Ashley Lai <adlai@...ux.vnet.ibm.com>
Thanks,
--Ashley Lai
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists