Am Montag, 23. September 2013, 20:14:36 schrieb Jason Gunthorpe:

> 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@obsidianresearch.com>

> ---

> drivers/char/tpm/tpm_i2c_infineon.c | 2 --

> drivers/char/tpm/tpm_i2c_stm_st33.c | 2 --

> drivers/char/tpm/tpm_spi_stm_st33.c | 1 -

> drivers/char/tpm/xen-tpmfront.c | 2 --

> 4 files changed, 7 deletions(-)

 

Nice catch.

Except for the tpm_spi_stm_st33.c part

 

Reviewed-by: Peter Huewe <peterhuewe@gmx.de>

Signed-off-by: Peter Huewe <peterhuewe@gmx.de>

 

Staged here
https://github.com/PeterHuewe/linux-tpmdd for-james

 

 

Since the tpm_spi_stm_st33 driver is not yet merged and was improved by you anyway, please include this improvement directly in the new driver.

 

 

Thanks,

Peter