aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/i2c/tpm/chip.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/i2c/tpm/chip.c')
-rw-r--r--src/drivers/i2c/tpm/chip.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/i2c/tpm/chip.c b/src/drivers/i2c/tpm/chip.c
index 2655b0da07..c2af071932 100644
--- a/src/drivers/i2c/tpm/chip.c
+++ b/src/drivers/i2c/tpm/chip.c
@@ -84,7 +84,13 @@ static struct device_operations i2c_tpm_ops = {
static void i2c_tpm_enable(struct device *dev)
{
+ struct drivers_i2c_tpm_config *config = dev->chip_info;
+
dev->ops = &i2c_tpm_ops;
+
+ if (config && config->desc) {
+ dev->name = config->desc;
+ }
}
struct chip_operations drivers_i2c_tpm_ops = {