equal
deleted
inserted
replaced
99 // Init kobject and add it to the hierarchy |
99 // Init kobject and add it to the hierarchy |
100 memset(&entry->kobj, 0x00, sizeof(struct kobject)); |
100 memset(&entry->kobj, 0x00, sizeof(struct kobject)); |
101 kobject_init(&entry->kobj); |
101 kobject_init(&entry->kobj); |
102 entry->kobj.ktype = &ktype_ec_sdo_entry; |
102 entry->kobj.ktype = &ktype_ec_sdo_entry; |
103 entry->kobj.parent = &sdo->kobj; |
103 entry->kobj.parent = &sdo->kobj; |
104 if (kobject_set_name(&entry->kobj, "%i", entry->subindex)) { |
104 if (kobject_set_name(&entry->kobj, "%02X", entry->subindex)) { |
105 EC_ERR("Failed to set kobj name.\n"); |
105 EC_ERR("Failed to set kobj name.\n"); |
106 kobject_put(&entry->kobj); |
106 kobject_put(&entry->kobj); |
107 return -1; |
107 return -1; |
108 } |
108 } |
109 if (kobject_add(&entry->kobj)) { |
109 if (kobject_add(&entry->kobj)) { |