Lines Matching refs:kobj
532 #define to_block(k) container_of(k, struct threshold_block, kobj)
535 static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf) in show() argument
537 struct threshold_block *b = to_block(kobj); in show()
546 static ssize_t store(struct kobject *kobj, struct attribute *attr, in store() argument
549 struct threshold_block *b = to_block(kobj); in store()
620 err = kobject_init_and_add(&b->kobj, &threshold_ktype, in allocate_threshold_blocks()
621 per_cpu(threshold_banks, cpu)[bank]->kobj, in allocate_threshold_blocks()
640 kobject_uevent(&b->kobj, KOBJ_ADD); in allocate_threshold_blocks()
646 kobject_put(&b->kobj); in allocate_threshold_blocks()
660 err = kobject_add(&b->blocks->kobj, b->kobj, b->blocks->kobj.name); in __threshold_add_blocks()
666 err = kobject_add(&pos->kobj, b->kobj, pos->kobj.name); in __threshold_add_blocks()
669 kobject_del(&pos->kobj); in __threshold_add_blocks()
692 err = kobject_add(b->kobj, &dev->kobj, name); in threshold_create_bank()
711 b->kobj = kobject_create_and_add(name, &dev->kobj); in threshold_create_bank()
712 if (!b->kobj) { in threshold_create_bank()
776 kobject_put(&pos->kobj); in deallocate_threshold_block()
790 kobject_del(b->kobj); in __threshold_remove_blocks()
793 kobject_del(&pos->kobj); in __threshold_remove_blocks()
826 kobject_del(b->kobj); in threshold_remove_bank()
827 kobject_put(b->kobj); in threshold_remove_bank()