Message ID | 1458941160-4437-3-git-send-email-christophe-h.ricard@st.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/char/tpm/tpm_i2c_atmel.c b/drivers/char/tpm/tpm_i2c_atmel.c index f311aaf..5426c9d 100644 --- a/drivers/char/tpm/tpm_i2c_atmel.c +++ b/drivers/char/tpm/tpm_i2c_atmel.c @@ -191,8 +191,7 @@ static int i2c_atmel_probe(struct i2c_client *client, static int i2c_atmel_remove(struct i2c_client *client) { - struct device *dev = &(client->dev); - struct tpm_chip *chip = dev_get_drvdata(dev); + struct tpm_chip *chip = i2c_get_clientdata(client); tpm_chip_unregister(chip); return 0; }
i2c_get_clientdata allows to simplify the current way to retrieve a tpm_chip structure. Signed-off-by: Christophe Ricard <christophe-h.ricard@st.com> --- drivers/char/tpm/tpm_i2c_atmel.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)