diff options
author | Jason Gunthorpe <jgunthorpe@obsidianresearch.com> | 2013-10-05 17:40:19 (GMT) |
---|---|---|
committer | Peter Huewe <peterhuewe@gmx.de> | 2013-10-22 17:42:35 (GMT) |
commit | d0a40174efb0b9d232ccd1cf127cb90a2120f55b (patch) | |
tree | 7d86946113fb9c444e1f50583515181b92c7f11e /drivers/char/tpm/xen-tpmfront.c | |
parent | 58c09e21332c4ab56ac694a71f6715db2768f53f (diff) | |
download | linux-d0a40174efb0b9d232ccd1cf127cb90a2120f55b.tar.xz |
tpm: Remove redundant dev_set_drvdata
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>
Reviewed-by: Joel Schopp <jschopp@linux.vnet.ibm.com>
Reviewed-by: Peter Huewe <peterhuewe@gmx.de>
Acked-by: Ashley Lai <adlai@linux.vnet.ibm.com>
Signed-off-by: Peter Huewe <peterhuewe@gmx.de>
Diffstat (limited to 'drivers/char/tpm/xen-tpmfront.c')
-rw-r--r-- | drivers/char/tpm/xen-tpmfront.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/char/tpm/xen-tpmfront.c b/drivers/char/tpm/xen-tpmfront.c index 7a7929b..9b48370 100644 --- a/drivers/char/tpm/xen-tpmfront.c +++ b/drivers/char/tpm/xen-tpmfront.c @@ -386,8 +386,6 @@ static int tpmfront_probe(struct xenbus_device *dev, tpm_get_timeouts(priv->chip); - dev_set_drvdata(&dev->dev, priv->chip); - return rv; } |