Lines Matching refs:attr_set
27 struct gov_attr_set *attr_set = to_gov_attr_set(kobj); in governor_store() local
31 mutex_lock(&attr_set->update_lock); in governor_store()
32 ret = attr_set->usage_count ? gattr->store(attr_set, buf, count) : -EBUSY; in governor_store()
33 mutex_unlock(&attr_set->update_lock); in governor_store()
43 void gov_attr_set_init(struct gov_attr_set *attr_set, struct list_head *list_node) in gov_attr_set_init() argument
45 INIT_LIST_HEAD(&attr_set->policy_list); in gov_attr_set_init()
46 mutex_init(&attr_set->update_lock); in gov_attr_set_init()
47 attr_set->usage_count = 1; in gov_attr_set_init()
48 list_add(list_node, &attr_set->policy_list); in gov_attr_set_init()
52 void gov_attr_set_get(struct gov_attr_set *attr_set, struct list_head *list_node) in gov_attr_set_get() argument
54 mutex_lock(&attr_set->update_lock); in gov_attr_set_get()
55 attr_set->usage_count++; in gov_attr_set_get()
56 list_add(list_node, &attr_set->policy_list); in gov_attr_set_get()
57 mutex_unlock(&attr_set->update_lock); in gov_attr_set_get()
61 unsigned int gov_attr_set_put(struct gov_attr_set *attr_set, struct list_head *list_node) in gov_attr_set_put() argument
65 mutex_lock(&attr_set->update_lock); in gov_attr_set_put()
67 count = --attr_set->usage_count; in gov_attr_set_put()
68 mutex_unlock(&attr_set->update_lock); in gov_attr_set_put()
72 mutex_destroy(&attr_set->update_lock); in gov_attr_set_put()
73 kobject_put(&attr_set->kobj); in gov_attr_set_put()