aboutsummaryrefslogtreecommitdiff
path: root/src/drivers/i2c/hid/hid.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/drivers/i2c/hid/hid.c')
-rw-r--r--src/drivers/i2c/hid/hid.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/drivers/i2c/hid/hid.c b/src/drivers/i2c/hid/hid.c
index 71d70d0cf6..bccce75a5d 100644
--- a/src/drivers/i2c/hid/hid.c
+++ b/src/drivers/i2c/hid/hid.c
@@ -58,7 +58,13 @@ static struct device_operations i2c_hid_ops = {
static void i2c_hid_enable(struct device *dev)
{
+ struct drivers_i2c_hid_config *config = dev->chip_info;
+
dev->ops = &i2c_hid_ops;
+
+ if (config && config->generic.desc) {
+ dev->name = config->generic.desc;
+ }
}
struct chip_operations drivers_i2c_hid_ops = {