Lines Matching refs:kobj
31 struct kobject *kobj; /* bare (not embedded) kobject for cache member
41 struct kobject kobj; member
135 return container_of(k, struct cache_index_dir, kobj); in kobj_to_cache_index_dir()
482 struct kobject *kobj = NULL; in cacheinfo_create_cache_dir() local
489 kobj = kobject_create_and_add("cache", &dev->kobj); in cacheinfo_create_cache_dir()
490 if (!kobj) in cacheinfo_create_cache_dir()
497 cache_dir->kobj = kobj; in cacheinfo_create_cache_dir()
505 kobject_put(kobj); in cacheinfo_create_cache_dir()
509 static void cache_index_release(struct kobject *kobj) in cache_index_release() argument
513 index = kobj_to_cache_index_dir(kobj); in cache_index_release()
707 rc = attr->show(&dir->kobj, attr, buf); in cacheinfo_create_index_opt_attrs()
715 if (sysfs_create_file(&dir->kobj, &attr->attr)) in cacheinfo_create_index_opt_attrs()
735 rc = kobject_init_and_add(&index_dir->kobj, &cache_index_type, in cacheinfo_create_index_dir()
736 cache_dir->kobj, "index%d", index); in cacheinfo_create_index_dir()
811 kobject_put(&index->kobj); in remove_index_dirs()
821 kobject_del(cache_dir->kobj); in remove_cache_dir()
823 kobject_put(cache_dir->kobj); in remove_cache_dir()