summaryrefslogtreecommitdiffstats
path: root/kernel/drivers/char/tpm/tpm-chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/drivers/char/tpm/tpm-chip.c')
-rw-r--r--kernel/drivers/char/tpm/tpm-chip.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/kernel/drivers/char/tpm/tpm-chip.c b/kernel/drivers/char/tpm/tpm-chip.c
index 283f00a7f..1082d4bb0 100644
--- a/kernel/drivers/char/tpm/tpm-chip.c
+++ b/kernel/drivers/char/tpm/tpm-chip.c
@@ -129,8 +129,9 @@ struct tpm_chip *tpmm_chip_alloc(struct device *dev,
device_initialize(&chip->dev);
- chip->cdev.owner = chip->pdev->driver->owner;
cdev_init(&chip->cdev, &tpm_fops);
+ chip->cdev.owner = chip->pdev->driver->owner;
+ chip->cdev.kobj.parent = &chip->dev.kobj;
return chip;
}