summaryrefslogtreecommitdiffstats
path: root/drivers/char
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/char')
-rw-r--r--drivers/char/tpm/tpm-interface.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/char/tpm/tpm-interface.c b/drivers/char/tpm/tpm-interface.c
index 080dade5e80f..5e3c1b684859 100644
--- a/drivers/char/tpm/tpm-interface.c
+++ b/drivers/char/tpm/tpm-interface.c
@@ -934,7 +934,7 @@ static struct tpm_input_header savestate_header = {
*/
int tpm_pm_suspend(struct device *dev)
{
- struct tpm_chip *chip = to_tpm_chip(dev);
+ struct tpm_chip *chip = dev_get_drvdata(dev);
struct tpm_cmd_t cmd;
int rc, try;
@@ -995,7 +995,7 @@ EXPORT_SYMBOL_GPL(tpm_pm_suspend);
*/
int tpm_pm_resume(struct device *dev)
{
- struct tpm_chip *chip = to_tpm_chip(dev);
+ struct tpm_chip *chip = dev_get_drvdata(dev);
if (chip == NULL)
return -ENODEV;