equal
deleted
inserted
replaced
109 |
109 |
110 // init kobject and add it to the hierarchy |
110 // init kobject and add it to the hierarchy |
111 memset(&sdo->kobj, 0x00, sizeof(struct kobject)); |
111 memset(&sdo->kobj, 0x00, sizeof(struct kobject)); |
112 kobject_init(&sdo->kobj); |
112 kobject_init(&sdo->kobj); |
113 sdo->kobj.ktype = &ktype_ec_sdo; |
113 sdo->kobj.ktype = &ktype_ec_sdo; |
114 sdo->kobj.parent = &slave->kobj; |
114 sdo->kobj.parent = &slave->sdo_kobj; |
115 if (kobject_set_name(&sdo->kobj, "sdo%4X", sdo->index)) { |
115 if (kobject_set_name(&sdo->kobj, "%4X", sdo->index)) { |
116 EC_ERR("Failed to set kobj name.\n"); |
116 EC_ERR("Failed to set kobj name.\n"); |
117 return -1; |
117 return -1; |
118 } |
118 } |
119 |
119 |
120 return 0; |
120 return 0; |
193 // init kobject and add it to the hierarchy |
193 // init kobject and add it to the hierarchy |
194 memset(&entry->kobj, 0x00, sizeof(struct kobject)); |
194 memset(&entry->kobj, 0x00, sizeof(struct kobject)); |
195 kobject_init(&entry->kobj); |
195 kobject_init(&entry->kobj); |
196 entry->kobj.ktype = &ktype_ec_sdo_entry; |
196 entry->kobj.ktype = &ktype_ec_sdo_entry; |
197 entry->kobj.parent = &sdo->kobj; |
197 entry->kobj.parent = &sdo->kobj; |
198 if (kobject_set_name(&entry->kobj, "entry%02X", entry->subindex)) { |
198 if (kobject_set_name(&entry->kobj, "%i", entry->subindex)) { |
199 EC_ERR("Failed to set kobj name.\n"); |
199 EC_ERR("Failed to set kobj name.\n"); |
200 return -1; |
200 return -1; |
201 } |
201 } |
202 |
202 |
203 return 0; |
203 return 0; |