Lines Matching refs:kobj
431 #define to_block(k) container_of(k, struct threshold_block, kobj)
434 static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf) in show() argument
436 struct threshold_block *b = to_block(kobj); in show()
445 static ssize_t store(struct kobject *kobj, struct attribute *attr, in store() argument
448 struct threshold_block *b = to_block(kobj); in store()
519 err = kobject_init_and_add(&b->kobj, &threshold_ktype, in allocate_threshold_blocks()
520 per_cpu(threshold_banks, cpu)[bank]->kobj, in allocate_threshold_blocks()
539 kobject_uevent(&b->kobj, KOBJ_ADD); in allocate_threshold_blocks()
545 kobject_put(&b->kobj); in allocate_threshold_blocks()
559 err = kobject_add(&b->blocks->kobj, b->kobj, b->blocks->kobj.name); in __threshold_add_blocks()
565 err = kobject_add(&pos->kobj, b->kobj, pos->kobj.name); in __threshold_add_blocks()
568 kobject_del(&pos->kobj); in __threshold_add_blocks()
591 err = kobject_add(b->kobj, &dev->kobj, name); in threshold_create_bank()
610 b->kobj = kobject_create_and_add(name, &dev->kobj); in threshold_create_bank()
611 if (!b->kobj) { in threshold_create_bank()
675 kobject_put(&pos->kobj); in deallocate_threshold_block()
689 kobject_del(b->kobj); in __threshold_remove_blocks()
692 kobject_del(&pos->kobj); in __threshold_remove_blocks()
725 kobject_del(b->kobj); in threshold_remove_bank()
726 kobject_put(b->kobj); in threshold_remove_bank()