From d0a40174efb0b9d232ccd1cf127cb90a2120f55b Mon Sep 17 00:00:00 2001 From: Jason Gunthorpe Date: Sat, 5 Oct 2013 11:40:19 -0600 Subject: 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 Reviewed-by: Joel Schopp Reviewed-by: Peter Huewe Acked-by: Ashley Lai Signed-off-by: Peter Huewe --- drivers/char/tpm/xen-tpmfront.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'drivers/char/tpm/xen-tpmfront.c') diff --git a/drivers/char/tpm/xen-tpmfront.c b/drivers/char/tpm/xen-tpmfront.c index 7a7929ba2658..9b483705694e 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; } -- cgit v1.2.3