master/sdo_entry.c
changeset 926 6bb33c6ec770
parent 861 6e3de145421a
child 939 6a3b0be56498
equal deleted inserted replaced
925:939f3e9bba1e 926:6bb33c6ec770
    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)) {