/linux-4.4.14/lib/ |
H A D | kobject.c | 23 * kobject_namespace - return @kobj's namespace tag 24 * @kobj: kobject in question 26 * Returns namespace tag of @kobj if its parent has namespace ops enabled 27 * and thus @kobj should have a namespace tag associated with it. Returns 30 const void *kobject_namespace(struct kobject *kobj) kobject_namespace() argument 32 const struct kobj_ns_type_operations *ns_ops = kobj_ns_ops(kobj); kobject_namespace() 37 return kobj->ktype->namespace(kobj); kobject_namespace() 42 * @kobj: object we're working on. 49 static int populate_dir(struct kobject *kobj) populate_dir() argument 51 struct kobj_type *t = get_ktype(kobj); populate_dir() 58 error = sysfs_create_file(kobj, attr); populate_dir() 66 static int create_dir(struct kobject *kobj) create_dir() argument 71 error = sysfs_create_dir_ns(kobj, kobject_namespace(kobj)); create_dir() 75 error = populate_dir(kobj); create_dir() 77 sysfs_remove_dir(kobj); create_dir() 82 * @kobj->sd may be deleted by an ancestor going away. Hold an create_dir() 83 * extra reference so that it stays until @kobj is gone. create_dir() 85 sysfs_get(kobj->sd); create_dir() 88 * If @kobj has ns_ops, its children need to be filtered based on create_dir() 89 * their namespace tags. Enable namespace support on @kobj->sd. create_dir() 91 ops = kobj_child_ns_ops(kobj); create_dir() 97 sysfs_enable_ns(kobj->sd); create_dir() 103 static int get_kobj_path_length(struct kobject *kobj) get_kobj_path_length() argument 106 struct kobject *parent = kobj; get_kobj_path_length() 121 static void fill_kobj_path(struct kobject *kobj, char *path, int length) fill_kobj_path() argument 126 for (parent = kobj; parent; parent = parent->parent) { fill_kobj_path() 134 pr_debug("kobject: '%s' (%p): %s: path = '%s'\n", kobject_name(kobj), fill_kobj_path() 135 kobj, __func__, path); fill_kobj_path() 139 * kobject_get_path - generate and return the path associated with a given kobj and kset pair. 141 * @kobj: kobject in question, with which to build the path 146 char *kobject_get_path(struct kobject *kobj, gfp_t gfp_mask) kobject_get_path() argument 151 len = get_kobj_path_length(kobj); kobject_get_path() 157 fill_kobj_path(kobj, path, len); kobject_get_path() 164 static void kobj_kset_join(struct kobject *kobj) kobj_kset_join() argument 166 if (!kobj->kset) kobj_kset_join() 169 kset_get(kobj->kset); kobj_kset_join() 170 spin_lock(&kobj->kset->list_lock); kobj_kset_join() 171 list_add_tail(&kobj->entry, &kobj->kset->list); kobj_kset_join() 172 spin_unlock(&kobj->kset->list_lock); kobj_kset_join() 176 static void kobj_kset_leave(struct kobject *kobj) kobj_kset_leave() argument 178 if (!kobj->kset) kobj_kset_leave() 181 spin_lock(&kobj->kset->list_lock); kobj_kset_leave() 182 list_del_init(&kobj->entry); kobj_kset_leave() 183 spin_unlock(&kobj->kset->list_lock); kobj_kset_leave() 184 kset_put(kobj->kset); kobj_kset_leave() 187 static void kobject_init_internal(struct kobject *kobj) kobject_init_internal() argument 189 if (!kobj) kobject_init_internal() 191 kref_init(&kobj->kref); kobject_init_internal() 192 INIT_LIST_HEAD(&kobj->entry); kobject_init_internal() 193 kobj->state_in_sysfs = 0; kobject_init_internal() 194 kobj->state_add_uevent_sent = 0; kobject_init_internal() 195 kobj->state_remove_uevent_sent = 0; kobject_init_internal() 196 kobj->state_initialized = 1; kobject_init_internal() 200 static int kobject_add_internal(struct kobject *kobj) kobject_add_internal() argument 205 if (!kobj) kobject_add_internal() 208 if (!kobj->name || !kobj->name[0]) { kobject_add_internal() 210 "name!\n", kobj); kobject_add_internal() 214 parent = kobject_get(kobj->parent); kobject_add_internal() 217 if (kobj->kset) { kobject_add_internal() 219 parent = kobject_get(&kobj->kset->kobj); kobject_add_internal() 220 kobj_kset_join(kobj); kobject_add_internal() 221 kobj->parent = parent; kobject_add_internal() 225 kobject_name(kobj), kobj, __func__, kobject_add_internal() 227 kobj->kset ? kobject_name(&kobj->kset->kobj) : "<NULL>"); kobject_add_internal() 229 error = create_dir(kobj); kobject_add_internal() 231 kobj_kset_leave(kobj); kobject_add_internal() 233 kobj->parent = NULL; kobject_add_internal() 240 __func__, kobject_name(kobj)); kobject_add_internal() 243 __func__, kobject_name(kobj), error, kobject_add_internal() 246 kobj->state_in_sysfs = 1; kobject_add_internal() 253 * @kobj: struct kobject to set the name of 257 int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, kobject_set_name_vargs() argument 262 if (kobj->name && !fmt) kobject_set_name_vargs() 285 kfree_const(kobj->name); kobject_set_name_vargs() 286 kobj->name = s; kobject_set_name_vargs() 293 * @kobj: struct kobject to set the name of 300 int kobject_set_name(struct kobject *kobj, const char *fmt, ...) kobject_set_name() argument 306 retval = kobject_set_name_vargs(kobj, fmt, vargs); kobject_set_name() 315 * @kobj: pointer to the kobject to initialize 325 void kobject_init(struct kobject *kobj, struct kobj_type *ktype) kobject_init() argument 329 if (!kobj) { kobject_init() 337 if (kobj->state_initialized) { kobject_init() 340 "object, something is seriously wrong.\n", kobj); kobject_init() 344 kobject_init_internal(kobj); kobject_init() 345 kobj->ktype = ktype; kobject_init() 349 printk(KERN_ERR "kobject (%p): %s\n", kobj, err_str); kobject_init() 354 static __printf(3, 0) int kobject_add_varg(struct kobject *kobj, kobject_add_varg() argument 360 retval = kobject_set_name_vargs(kobj, fmt, vargs); kobject_add_varg() 365 kobj->parent = parent; kobject_add_varg() 366 return kobject_add_internal(kobj); kobject_add_varg() 371 * @kobj: the kobject to add 378 * If @parent is set, then the parent of the @kobj will be set to it. 379 * If @parent is NULL, then the parent of the @kobj will be set to the 394 int kobject_add(struct kobject *kobj, struct kobject *parent, kobject_add() argument 400 if (!kobj) kobject_add() 403 if (!kobj->state_initialized) { kobject_add() 406 kobject_name(kobj), kobj); kobject_add() 411 retval = kobject_add_varg(kobj, parent, fmt, args); kobject_add() 420 * @kobj: pointer to the kobject to initialize 429 int kobject_init_and_add(struct kobject *kobj, struct kobj_type *ktype, kobject_init_and_add() argument 435 kobject_init(kobj, ktype); kobject_init_and_add() 438 retval = kobject_add_varg(kobj, parent, fmt, args); kobject_init_and_add() 447 * @kobj: object in question. 455 int kobject_rename(struct kobject *kobj, const char *new_name) kobject_rename() argument 463 kobj = kobject_get(kobj); kobject_rename() 464 if (!kobj) kobject_rename() 466 if (!kobj->parent) kobject_rename() 469 devpath = kobject_get_path(kobj, GFP_KERNEL); kobject_rename() 489 error = sysfs_rename_dir_ns(kobj, new_name, kobject_namespace(kobj)); kobject_rename() 494 dup_name = kobj->name; kobject_rename() 495 kobj->name = name; kobject_rename() 500 kobject_uevent_env(kobj, KOBJ_MOVE, envp); kobject_rename() 506 kobject_put(kobj); kobject_rename() 514 * @kobj: object in question. 517 int kobject_move(struct kobject *kobj, struct kobject *new_parent) kobject_move() argument 525 kobj = kobject_get(kobj); kobject_move() 526 if (!kobj) kobject_move() 530 if (kobj->kset) kobject_move() 531 new_parent = kobject_get(&kobj->kset->kobj); kobject_move() 535 devpath = kobject_get_path(kobj, GFP_KERNEL); kobject_move() 548 error = sysfs_move_dir_ns(kobj, new_parent, kobject_namespace(kobj)); kobject_move() 551 old_parent = kobj->parent; kobject_move() 552 kobj->parent = new_parent; kobject_move() 555 kobject_uevent_env(kobj, KOBJ_MOVE, envp); kobject_move() 558 kobject_put(kobj); kobject_move() 567 * @kobj: object. 569 void kobject_del(struct kobject *kobj) kobject_del() argument 573 if (!kobj) kobject_del() 576 sd = kobj->sd; kobject_del() 577 sysfs_remove_dir(kobj); kobject_del() 580 kobj->state_in_sysfs = 0; kobject_del() 581 kobj_kset_leave(kobj); kobject_del() 582 kobject_put(kobj->parent); kobject_del() 583 kobj->parent = NULL; kobject_del() 589 * @kobj: object. 591 struct kobject *kobject_get(struct kobject *kobj) kobject_get() argument 593 if (kobj) { kobject_get() 594 if (!kobj->state_initialized) kobject_get() 597 "called.\n", kobject_name(kobj), kobj); kobject_get() 598 kref_get(&kobj->kref); kobject_get() 600 return kobj; kobject_get() 604 static struct kobject * __must_check kobject_get_unless_zero(struct kobject *kobj) kobject_get_unless_zero() argument 606 if (!kref_get_unless_zero(&kobj->kref)) kobject_get_unless_zero() 607 kobj = NULL; kobject_get_unless_zero() 608 return kobj; kobject_get_unless_zero() 613 * @kobj: object to cleanup 615 static void kobject_cleanup(struct kobject *kobj) kobject_cleanup() argument 617 struct kobj_type *t = get_ktype(kobj); kobject_cleanup() 618 const char *name = kobj->name; kobject_cleanup() 621 kobject_name(kobj), kobj, __func__, kobj->parent); kobject_cleanup() 626 kobject_name(kobj), kobj); kobject_cleanup() 629 if (kobj->state_add_uevent_sent && !kobj->state_remove_uevent_sent) { kobject_cleanup() 631 kobject_name(kobj), kobj); kobject_cleanup() 632 kobject_uevent(kobj, KOBJ_REMOVE); kobject_cleanup() 636 if (kobj->state_in_sysfs) { kobject_cleanup() 638 kobject_name(kobj), kobj); kobject_cleanup() 639 kobject_del(kobj); kobject_cleanup() 644 kobject_name(kobj), kobj); kobject_cleanup() 645 t->release(kobj); kobject_cleanup() 665 struct kobject *kobj = container_of(kref, struct kobject, kref); kobject_release() local 669 kobject_name(kobj), kobj, __func__, kobj->parent, delay); kobject_release() 670 INIT_DELAYED_WORK(&kobj->release, kobject_delayed_cleanup); kobject_release() 672 schedule_delayed_work(&kobj->release, delay); kobject_release() 674 kobject_cleanup(kobj); kobject_release() 680 * @kobj: object. 684 void kobject_put(struct kobject *kobj) kobject_put() argument 686 if (kobj) { kobject_put() 687 if (!kobj->state_initialized) kobject_put() 690 "called.\n", kobject_name(kobj), kobj); kobject_put() 691 kref_put(&kobj->kref, kobject_release); kobject_put() 696 static void dynamic_kobj_release(struct kobject *kobj) dynamic_kobj_release() argument 698 pr_debug("kobject: (%p): %s\n", kobj, __func__); dynamic_kobj_release() 699 kfree(kobj); dynamic_kobj_release() 720 struct kobject *kobj; kobject_create() local 722 kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); kobject_create() 723 if (!kobj) kobject_create() 726 kobject_init(kobj, &dynamic_kobj_ktype); kobject_create() 727 return kobj; kobject_create() 745 struct kobject *kobj; kobject_create_and_add() local 748 kobj = kobject_create(); kobject_create_and_add() 749 if (!kobj) kobject_create_and_add() 752 retval = kobject_add(kobj, parent, "%s", name); kobject_create_and_add() 756 kobject_put(kobj); kobject_create_and_add() 757 kobj = NULL; kobject_create_and_add() 759 return kobj; kobject_create_and_add() 769 kobject_init_internal(&k->kobj); kset_init() 775 static ssize_t kobj_attr_show(struct kobject *kobj, struct attribute *attr, kobj_attr_show() argument 783 ret = kattr->show(kobj, kattr, buf); kobj_attr_show() 787 static ssize_t kobj_attr_store(struct kobject *kobj, struct attribute *attr, kobj_attr_store() argument 795 ret = kattr->store(kobj, kattr, buf, count); kobj_attr_store() 817 err = kobject_add_internal(&k->kobj); kset_register() 820 kobject_uevent(&k->kobj, KOBJ_ADD); kset_register() 833 kobject_del(&k->kobj); kset_unregister() 834 kobject_put(&k->kobj); kset_unregister() 865 static void kset_release(struct kobject *kobj) kset_release() argument 867 struct kset *kset = container_of(kobj, struct kset, kobj); kset_release() 869 kobject_name(kobj), kobj, __func__); kset_release() 903 retval = kobject_set_name(&kset->kobj, "%s", name); kset_create() 909 kset->kobj.parent = parent_kobj; kset_create() 916 kset->kobj.ktype = &kset_ktype; kset_create() 917 kset->kobj.kset = NULL; kset_create() 1008 const struct kobj_ns_type_operations *kobj_ns_ops(struct kobject *kobj) kobj_ns_ops() argument 1010 return kobj_child_ns_ops(kobj->parent); kobj_ns_ops()
|
H A D | kobject_uevent.c | 92 struct kobject *kobj = data, *ksobj; kobj_bcast_filter() local 95 ops = kobj_ns_ops(kobj); kobj_bcast_filter() 96 if (!ops && kobj->kset) { kobj_bcast_filter() 97 ksobj = &kobj->kset->kobj; kobj_bcast_filter() 102 if (ops && ops->netlink_ns && kobj->ktype->namespace) { kobj_bcast_filter() 104 ns = kobj->ktype->namespace(kobj); kobj_bcast_filter() 114 static int kobj_usermode_filter(struct kobject *kobj) kobj_usermode_filter() argument 118 ops = kobj_ns_ops(kobj); kobj_usermode_filter() 121 ns = kobj->ktype->namespace(kobj); kobj_usermode_filter() 158 * @kobj: struct kobject that the action is happening to 164 int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, kobject_uevent_env() argument 181 kobject_name(kobj), kobj, __func__); kobject_uevent_env() 184 top_kobj = kobj; kobject_uevent_env() 190 "without kset!\n", kobject_name(kobj), kobj, kobject_uevent_env() 199 if (kobj->uevent_suppress) { kobject_uevent_env() 202 kobject_name(kobj), kobj, __func__); kobject_uevent_env() 207 if (!uevent_ops->filter(kset, kobj)) { kobject_uevent_env() 210 kobject_name(kobj), kobj, __func__); kobject_uevent_env() 216 subsystem = uevent_ops->name(kset, kobj); kobject_uevent_env() 218 subsystem = kobject_name(&kset->kobj); kobject_uevent_env() 221 "event to drop!\n", kobject_name(kobj), kobj, kobject_uevent_env() 232 devpath = kobject_get_path(kobj, GFP_KERNEL); kobject_uevent_env() 260 retval = uevent_ops->uevent(kset, kobj, env); kobject_uevent_env() 263 "%d\n", kobject_name(kobj), kobj, kobject_uevent_env() 276 kobj->state_add_uevent_sent = 1; kobject_uevent_env() 278 kobj->state_remove_uevent_sent = 1; kobject_uevent_env() 319 kobj); kobject_uevent_env() 331 if (uevent_helper[0] && !kobj_usermode_filter(kobj)) { kobject_uevent_env() 367 * @kobj: struct kobject that the action is happening to 372 int kobject_uevent(struct kobject *kobj, enum kobject_action action) kobject_uevent() argument 374 return kobject_uevent_env(kobj, action, NULL); kobject_uevent()
|
/linux-4.4.14/fs/xfs/ |
H A D | xfs_sysfs.h | 36 struct xfs_kobj *kobj = to_kobj(kobject); xfs_sysfs_release() local 37 complete(&kobj->complete); xfs_sysfs_release() 42 struct xfs_kobj *kobj, xfs_sysfs_init() 47 init_completion(&kobj->complete); xfs_sysfs_init() 48 return kobject_init_and_add(&kobj->kobject, ktype, xfs_sysfs_init() 54 struct xfs_kobj *kobj) xfs_sysfs_del() 56 kobject_del(&kobj->kobject); xfs_sysfs_del() 57 kobject_put(&kobj->kobject); xfs_sysfs_del() 58 wait_for_completion(&kobj->complete); xfs_sysfs_del() 41 xfs_sysfs_init( struct xfs_kobj *kobj, struct kobj_type *ktype, struct xfs_kobj *parent_kobj, const char *name) xfs_sysfs_init() argument 53 xfs_sysfs_del( struct xfs_kobj *kobj) xfs_sysfs_del() argument
|
H A D | xfs_sysfs.c | 137 struct xfs_kobj *kobj = to_kobj(kobject); to_xstats() local 139 return container_of(kobj, struct xstats, xs_kobj); to_xstats() 192 struct xfs_kobj *kobj = to_kobj(kobject); to_xlog() local 194 return container_of(kobj, struct xlog, l_kobj); to_xlog()
|
/linux-4.4.14/fs/sysfs/ |
H A D | dir.c | 38 * @kobj: object we're creating directory for 41 int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) sysfs_create_dir_ns() argument 45 BUG_ON(!kobj); sysfs_create_dir_ns() 47 if (kobj->parent) sysfs_create_dir_ns() 48 parent = kobj->parent->sd; sysfs_create_dir_ns() 55 kn = kernfs_create_dir_ns(parent, kobject_name(kobj), sysfs_create_dir_ns() 56 S_IRWXU | S_IRUGO | S_IXUGO, kobj, ns); sysfs_create_dir_ns() 59 sysfs_warn_dup(parent, kobject_name(kobj)); sysfs_create_dir_ns() 63 kobj->sd = kn; sysfs_create_dir_ns() 69 * @kobj: object. 75 void sysfs_remove_dir(struct kobject *kobj) sysfs_remove_dir() argument 77 struct kernfs_node *kn = kobj->sd; sysfs_remove_dir() 82 * protection; however, when @kobj is used as a symlink target, the sysfs_remove_dir() 83 * symlinking entity usually doesn't own @kobj and thus has no sysfs_remove_dir() 84 * control over removal. @kobj->sd may be removed anytime sysfs_remove_dir() 87 * sysfs_symlink_target_lock synchronizes @kobj->sd sysfs_remove_dir() 89 * can safely dereference @kobj->sd. sysfs_remove_dir() 92 kobj->sd = NULL; sysfs_remove_dir() 101 int sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name, sysfs_rename_dir_ns() argument 107 parent = kernfs_get_parent(kobj->sd); sysfs_rename_dir_ns() 108 ret = kernfs_rename_ns(kobj->sd, parent, new_name, new_ns); sysfs_rename_dir_ns() 113 int sysfs_move_dir_ns(struct kobject *kobj, struct kobject *new_parent_kobj, sysfs_move_dir_ns() argument 116 struct kernfs_node *kn = kobj->sd; sysfs_move_dir_ns()
|
H A D | group.c | 35 static int create_files(struct kernfs_node *parent, struct kobject *kobj, create_files() argument 54 mode = grp->is_visible(kobj, *attr, i); create_files() 83 mode = grp->is_bin_visible(kobj, *bin_attr, i); create_files() 107 static int internal_create_group(struct kobject *kobj, int update, internal_create_group() argument 113 BUG_ON(!kobj || (!update && !kobj->sd)); internal_create_group() 116 if (unlikely(update && !kobj->sd)) internal_create_group() 120 kobj->name, grp->name ?: ""); internal_create_group() 124 kn = kernfs_create_dir(kobj->sd, grp->name, internal_create_group() 125 S_IRWXU | S_IRUGO | S_IXUGO, kobj); internal_create_group() 128 sysfs_warn_dup(kobj->sd, grp->name); internal_create_group() 132 kn = kobj->sd; internal_create_group() 134 error = create_files(kn, kobj, grp, update); internal_create_group() 145 * @kobj: The kobject to create the group on 153 int sysfs_create_group(struct kobject *kobj, sysfs_create_group() argument 156 return internal_create_group(kobj, 0, grp); sysfs_create_group() 162 * @kobj: The kobject to create the group on 173 int sysfs_create_groups(struct kobject *kobj, sysfs_create_groups() argument 183 error = sysfs_create_group(kobj, groups[i]); sysfs_create_groups() 186 sysfs_remove_group(kobj, groups[i]); sysfs_create_groups() 196 * @kobj: The kobject to update the group on 211 int sysfs_update_group(struct kobject *kobj, sysfs_update_group() argument 214 return internal_create_group(kobj, 1, grp); sysfs_update_group() 220 * @kobj: kobject to remove the group from 226 void sysfs_remove_group(struct kobject *kobj, sysfs_remove_group() argument 229 struct kernfs_node *parent = kobj->sd; sysfs_remove_group() 237 grp, kobject_name(kobj)); sysfs_remove_group() 256 * @kobj: The kobject for the groups to be removed from 261 void sysfs_remove_groups(struct kobject *kobj, sysfs_remove_groups() argument 269 sysfs_remove_group(kobj, groups[i]); sysfs_remove_groups() 275 * @kobj: The kobject containing the group. 282 int sysfs_merge_group(struct kobject *kobj, sysfs_merge_group() argument 290 parent = kernfs_find_and_get(kobj->sd, grp->name); sysfs_merge_group() 308 * @kobj: The kobject containing the group. 311 void sysfs_unmerge_group(struct kobject *kobj, sysfs_unmerge_group() argument 317 parent = kernfs_find_and_get(kobj->sd, grp->name); sysfs_unmerge_group() 328 * @kobj: The kobject containing the group. 333 int sysfs_add_link_to_group(struct kobject *kobj, const char *group_name, sysfs_add_link_to_group() argument 339 parent = kernfs_find_and_get(kobj->sd, group_name); sysfs_add_link_to_group() 352 * @kobj: The kobject containing the group. 356 void sysfs_remove_link_from_group(struct kobject *kobj, const char *group_name, sysfs_remove_link_from_group() argument 361 parent = kernfs_find_and_get(kobj->sd, group_name); sysfs_remove_link_from_group() 372 * @kobj: The kobject containing the group. 376 int __compat_only_sysfs_link_entry_to_kobj(struct kobject *kobj, __compat_only_sysfs_link_entry_to_kobj() argument 403 link = kernfs_create_link(kobj->sd, target_name, entry); __compat_only_sysfs_link_entry_to_kobj() 405 sysfs_warn_dup(kobj->sd, target_name); __compat_only_sysfs_link_entry_to_kobj()
|
H A D | symlink.c | 67 static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target, sysfs_do_create_link() argument 72 if (!kobj) sysfs_do_create_link() 75 parent = kobj->sd; sysfs_do_create_link() 85 * @kobj: object whose directory we're creating the link in. 89 int sysfs_create_link(struct kobject *kobj, struct kobject *target, sysfs_create_link() argument 92 return sysfs_do_create_link(kobj, target, name, 1); sysfs_create_link() 98 * @kobj: object whose directory we're creating the link in. 105 int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, sysfs_create_link_nowarn() argument 108 return sysfs_do_create_link(kobj, target, name, 0); sysfs_create_link_nowarn() 113 * @kobj: object we're acting for. 120 void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, sysfs_delete_link() argument 131 if (targ->sd && kernfs_ns_enabled(kobj->sd)) sysfs_delete_link() 134 kernfs_remove_by_name_ns(kobj->sd, name, ns); sysfs_delete_link() 139 * @kobj: object we're acting for. 142 void sysfs_remove_link(struct kobject *kobj, const char *name) sysfs_remove_link() argument 146 if (!kobj) sysfs_remove_link() 149 parent = kobj->sd; sysfs_remove_link() 157 * @kobj: object we're acting for. 165 int sysfs_rename_link_ns(struct kobject *kobj, struct kobject *targ, sysfs_rename_link_ns() argument 172 if (!kobj) sysfs_rename_link_ns() 175 parent = kobj->sd; sysfs_rename_link_ns()
|
H A D | file.c | 30 struct kobject *kobj = kn->parent->priv; sysfs_file_ops() local 34 return kobj->ktype ? kobj->ktype->sysfs_ops : NULL; sysfs_file_ops() 45 struct kobject *kobj = of->kn->parent->priv; sysfs_kf_seq_show() local 63 count = ops->show(kobj, of->kn->priv, buf); sysfs_kf_seq_show() 86 struct kobject *kobj = of->kn->parent->priv; sysfs_kf_bin_read() local 102 return battr->read(of->file, kobj, battr, buf, pos, count); sysfs_kf_bin_read() 110 struct kobject *kobj = of->kn->parent->priv; sysfs_kf_read() local 119 len = ops->show(kobj, of->kn->priv, buf); sysfs_kf_read() 128 struct kobject *kobj = of->kn->parent->priv; sysfs_kf_write() local 133 return ops->store(kobj, of->kn->priv, buf, count); sysfs_kf_write() 141 struct kobject *kobj = of->kn->parent->priv; sysfs_kf_bin_write() local 155 return battr->write(of->file, kobj, battr, buf, pos, count); sysfs_kf_bin_write() 162 struct kobject *kobj = of->kn->parent->priv; sysfs_kf_bin_mmap() local 164 return battr->mmap(of->file, kobj, battr, vma); sysfs_kf_bin_mmap() 167 void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr) sysfs_notify() argument 169 struct kernfs_node *kn = kobj->sd, *tmp; sysfs_notify() 250 struct kobject *kobj = parent->priv; sysfs_add_file_mode_ns() local 251 const struct sysfs_ops *sysfs_ops = kobj->ktype->sysfs_ops; sysfs_add_file_mode_ns() 256 kobject_name(kobj))) sysfs_add_file_mode_ns() 317 * @kobj: object we're creating for 321 int sysfs_create_file_ns(struct kobject *kobj, const struct attribute *attr, sysfs_create_file_ns() argument 324 BUG_ON(!kobj || !kobj->sd || !attr); sysfs_create_file_ns() 326 return sysfs_add_file_mode_ns(kobj->sd, attr, false, attr->mode, ns); sysfs_create_file_ns() 331 int sysfs_create_files(struct kobject *kobj, const struct attribute **ptr) sysfs_create_files() argument 337 err = sysfs_create_file(kobj, ptr[i]); sysfs_create_files() 340 sysfs_remove_file(kobj, ptr[i]); sysfs_create_files() 347 * @kobj: object we're acting for. 351 int sysfs_add_file_to_group(struct kobject *kobj, sysfs_add_file_to_group() argument 358 parent = kernfs_find_and_get(kobj->sd, group); sysfs_add_file_to_group() 360 parent = kobj->sd; sysfs_add_file_to_group() 376 * @kobj: object we're acting for. 381 int sysfs_chmod_file(struct kobject *kobj, const struct attribute *attr, sysfs_chmod_file() argument 388 kn = kernfs_find_and_get(kobj->sd, attr->name); sysfs_chmod_file() 404 * @kobj: object we're acting for 410 void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr, sysfs_remove_file_ns() argument 413 struct kernfs_node *parent = kobj->sd; sysfs_remove_file_ns() 421 * @kobj: object we're acting for 426 bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr) sysfs_remove_file_self() argument 428 struct kernfs_node *parent = kobj->sd; sysfs_remove_file_self() 442 void sysfs_remove_files(struct kobject *kobj, const struct attribute **ptr) sysfs_remove_files() argument 446 sysfs_remove_file(kobj, ptr[i]); sysfs_remove_files() 452 * @kobj: object we're acting for. 456 void sysfs_remove_file_from_group(struct kobject *kobj, sysfs_remove_file_from_group() argument 462 parent = kernfs_find_and_get(kobj->sd, group); sysfs_remove_file_from_group() 464 parent = kobj->sd; sysfs_remove_file_from_group() 477 * @kobj: object. 480 int sysfs_create_bin_file(struct kobject *kobj, sysfs_create_bin_file() argument 483 BUG_ON(!kobj || !kobj->sd || !attr); sysfs_create_bin_file() 485 return sysfs_add_file(kobj->sd, &attr->attr, true); sysfs_create_bin_file() 491 * @kobj: object. 494 void sysfs_remove_bin_file(struct kobject *kobj, sysfs_remove_bin_file() argument 497 kernfs_remove_by_name(kobj->sd, attr->attr.name); sysfs_remove_bin_file()
|
/linux-4.4.14/include/linux/ |
H A D | sysfs.h | 216 int __must_check sysfs_create_dir_ns(struct kobject *kobj, const void *ns); 217 void sysfs_remove_dir(struct kobject *kobj); 218 int __must_check sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name, 220 int __must_check sysfs_move_dir_ns(struct kobject *kobj, 228 int __must_check sysfs_create_file_ns(struct kobject *kobj, 231 int __must_check sysfs_create_files(struct kobject *kobj, 233 int __must_check sysfs_chmod_file(struct kobject *kobj, 235 void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr, 237 bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr); 238 void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); 240 int __must_check sysfs_create_bin_file(struct kobject *kobj, 242 void sysfs_remove_bin_file(struct kobject *kobj, 245 int __must_check sysfs_create_link(struct kobject *kobj, struct kobject *target, 247 int __must_check sysfs_create_link_nowarn(struct kobject *kobj, 250 void sysfs_remove_link(struct kobject *kobj, const char *name); 252 int sysfs_rename_link_ns(struct kobject *kobj, struct kobject *target, 259 int __must_check sysfs_create_group(struct kobject *kobj, 261 int __must_check sysfs_create_groups(struct kobject *kobj, 263 int sysfs_update_group(struct kobject *kobj, 265 void sysfs_remove_group(struct kobject *kobj, 267 void sysfs_remove_groups(struct kobject *kobj, 269 int sysfs_add_file_to_group(struct kobject *kobj, 271 void sysfs_remove_file_from_group(struct kobject *kobj, 273 int sysfs_merge_group(struct kobject *kobj, 275 void sysfs_unmerge_group(struct kobject *kobj, 277 int sysfs_add_link_to_group(struct kobject *kobj, const char *group_name, 279 void sysfs_remove_link_from_group(struct kobject *kobj, const char *group_name, 281 int __compat_only_sysfs_link_entry_to_kobj(struct kobject *kobj, 285 void sysfs_notify(struct kobject *kobj, const char *dir, const char *attr); 296 static inline int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) sysfs_create_dir_ns() argument 301 static inline void sysfs_remove_dir(struct kobject *kobj) sysfs_remove_dir() argument 305 static inline int sysfs_rename_dir_ns(struct kobject *kobj, sysfs_rename_dir_ns() argument 311 static inline int sysfs_move_dir_ns(struct kobject *kobj, sysfs_move_dir_ns() argument 329 static inline int sysfs_create_file_ns(struct kobject *kobj, sysfs_create_file_ns() argument 336 static inline int sysfs_create_files(struct kobject *kobj, sysfs_create_files() argument 342 static inline int sysfs_chmod_file(struct kobject *kobj, sysfs_chmod_file() argument 348 static inline void sysfs_remove_file_ns(struct kobject *kobj, sysfs_remove_file_ns() argument 354 static inline bool sysfs_remove_file_self(struct kobject *kobj, sysfs_remove_file_self() argument 360 static inline void sysfs_remove_files(struct kobject *kobj, sysfs_remove_files() argument 365 static inline int sysfs_create_bin_file(struct kobject *kobj, sysfs_create_bin_file() argument 371 static inline void sysfs_remove_bin_file(struct kobject *kobj, sysfs_remove_bin_file() argument 376 static inline int sysfs_create_link(struct kobject *kobj, sysfs_create_link() argument 382 static inline int sysfs_create_link_nowarn(struct kobject *kobj, sysfs_create_link_nowarn() argument 389 static inline void sysfs_remove_link(struct kobject *kobj, const char *name) sysfs_remove_link() argument 405 static inline int sysfs_create_group(struct kobject *kobj, sysfs_create_group() argument 411 static inline int sysfs_create_groups(struct kobject *kobj, sysfs_create_groups() argument 417 static inline int sysfs_update_group(struct kobject *kobj, sysfs_update_group() argument 423 static inline void sysfs_remove_group(struct kobject *kobj, sysfs_remove_group() argument 428 static inline void sysfs_remove_groups(struct kobject *kobj, sysfs_remove_groups() argument 433 static inline int sysfs_add_file_to_group(struct kobject *kobj, sysfs_add_file_to_group() argument 439 static inline void sysfs_remove_file_from_group(struct kobject *kobj, sysfs_remove_file_from_group() argument 444 static inline int sysfs_merge_group(struct kobject *kobj, sysfs_merge_group() argument 450 static inline void sysfs_unmerge_group(struct kobject *kobj, sysfs_unmerge_group() argument 455 static inline int sysfs_add_link_to_group(struct kobject *kobj, sysfs_add_link_to_group() argument 462 static inline void sysfs_remove_link_from_group(struct kobject *kobj, sysfs_remove_link_from_group() argument 468 struct kobject *kobj, __compat_only_sysfs_link_entry_to_kobj() 475 static inline void sysfs_notify(struct kobject *kobj, const char *dir, sysfs_notify() argument 491 static inline int __must_check sysfs_create_file(struct kobject *kobj, sysfs_create_file() argument 494 return sysfs_create_file_ns(kobj, attr, NULL); sysfs_create_file() 497 static inline void sysfs_remove_file(struct kobject *kobj, sysfs_remove_file() argument 500 sysfs_remove_file_ns(kobj, attr, NULL); sysfs_remove_file() 503 static inline int sysfs_rename_link(struct kobject *kobj, struct kobject *target, sysfs_rename_link() argument 506 return sysfs_rename_link_ns(kobj, target, old_name, new_name, NULL); sysfs_rename_link() 467 __compat_only_sysfs_link_entry_to_kobj( struct kobject *kobj, struct kobject *target_kobj, const char *target_name) __compat_only_sysfs_link_entry_to_kobj() argument
|
H A D | kobject.h | 50 * kobject_uevent_env(kobj, KOBJ_CHANGE, env) with additional event 82 int kobject_set_name(struct kobject *kobj, const char *name, ...); 84 int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, 87 static inline const char *kobject_name(const struct kobject *kobj) kobject_name() argument 89 return kobj->name; kobject_name() 92 extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); 94 int kobject_add(struct kobject *kobj, struct kobject *parent, 97 int kobject_init_and_add(struct kobject *kobj, 101 extern void kobject_del(struct kobject *kobj); 110 extern struct kobject *kobject_get(struct kobject *kobj); 111 extern void kobject_put(struct kobject *kobj); 113 extern const void *kobject_namespace(struct kobject *kobj); 114 extern char *kobject_get_path(struct kobject *kobj, gfp_t flag); 117 void (*release)(struct kobject *kobj); 120 const struct kobj_ns_type_operations *(*child_ns_type)(struct kobject *kobj); 121 const void *(*namespace)(struct kobject *kobj); 133 int (* const filter)(struct kset *kset, struct kobject *kobj); 134 const char *(* const name)(struct kset *kset, struct kobject *kobj); 135 int (* const uevent)(struct kset *kset, struct kobject *kobj, 141 ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr, 143 ssize_t (*store)(struct kobject *kobj, struct kobj_attribute *attr, 162 * @kobj: the embedded kobject for this kset (recursion, isn't it fun...) 171 struct kobject kobj; member in struct:kset 182 static inline struct kset *to_kset(struct kobject *kobj) to_kset() argument 184 return kobj ? container_of(kobj, struct kset, kobj) : NULL; to_kset() 189 return k ? to_kset(kobject_get(&k->kobj)) : NULL; kset_get() 194 kobject_put(&k->kobj); kset_put() 197 static inline struct kobj_type *get_ktype(struct kobject *kobj) get_ktype() argument 199 return kobj->ktype; get_ktype() 215 int kobject_uevent(struct kobject *kobj, enum kobject_action action); 216 int kobject_uevent_env(struct kobject *kobj, enum kobject_action action,
|
H A D | cdev.h | 13 struct kobject kobj; member in struct:cdev
|
H A D | livepatch.h | 42 * @kobj: kobject for sysfs resources 61 struct kobject kobj; member in struct:klp_func 90 * @kobj: kobject for sysfs resources 102 struct kobject kobj; member in struct:klp_object 112 * @kobj: kobject for sysfs resources 122 struct kobject kobj; member in struct:klp_patch
|
/linux-4.4.14/drivers/firmware/efi/ |
H A D | runtime-map.c | 23 struct kobject kobj; /* kobject for each entry */ member in struct:efi_runtime_map_entry 56 static inline struct efi_runtime_map_entry *to_map_entry(struct kobject *kobj) to_map_entry() argument 58 return container_of(kobj, struct efi_runtime_map_entry, kobj); to_map_entry() 61 static ssize_t map_attr_show(struct kobject *kobj, struct attribute *attr, map_attr_show() argument 64 struct efi_runtime_map_entry *entry = to_map_entry(kobj); map_attr_show() 92 static void map_release(struct kobject *kobj) map_release() argument 96 entry = to_map_entry(kobj); map_release() 109 add_sysfs_runtime_map_entry(struct kobject *kobj, int nr) add_sysfs_runtime_map_entry() argument 115 map_kset = kset_create_and_add("runtime-map", NULL, kobj); add_sysfs_runtime_map_entry() 130 kobject_init(&entry->kobj, &map_ktype); add_sysfs_runtime_map_entry() 131 entry->kobj.kset = map_kset; add_sysfs_runtime_map_entry() 132 ret = kobject_add(&entry->kobj, NULL, "%d", nr); add_sysfs_runtime_map_entry() 134 kobject_put(&entry->kobj); add_sysfs_runtime_map_entry() 198 kobject_put(&entry->kobj); efi_runtime_map_init()
|
H A D | esrt.c | 65 struct kobject kobj; member in struct:esre_entry 80 static struct esre_entry *to_entry(struct kobject *kobj) to_entry() argument 82 return container_of(kobj, struct esre_entry, kobj); to_entry() 90 static ssize_t esre_attr_show(struct kobject *kobj, esre_attr_show() argument 93 struct esre_entry *entry = to_entry(kobj); esre_attr_show() 149 static void esre_release(struct kobject *kobj) esre_release() argument 151 struct esre_entry *entry = to_entry(kobj); esre_release() 178 entry->kobj.kset = esrt_kset; esre_create_sysfs_entry() 184 rc = kobject_init_and_add(&entry->kobj, &esre1_ktype, NULL, esre_create_sysfs_entry() 198 static ssize_t esrt_##name##_show(struct kobject *kobj, \ 227 static umode_t esrt_attr_is_visible(struct kobject *kobj, esrt_attr_is_visible() argument 381 kobject_put(&entry->kobj); cleanup_entry_list()
|
H A D | efivars.c | 114 #define to_efivar_entry(obj) container_of(obj, struct efivar_entry, kobj) 350 static ssize_t efivar_attr_show(struct kobject *kobj, struct attribute *attr, efivar_attr_show() argument 353 struct efivar_entry *var = to_efivar_entry(kobj); efivar_attr_show() 366 static ssize_t efivar_attr_store(struct kobject *kobj, struct attribute *attr, efivar_attr_store() argument 369 struct efivar_entry *var = to_efivar_entry(kobj); efivar_attr_store() 387 static void efivar_release(struct kobject *kobj) efivar_release() argument 389 struct efivar_entry *var = container_of(kobj, struct efivar_entry, kobj); efivar_release() 414 static ssize_t efivar_create(struct file *filp, struct kobject *kobj, efivar_create() argument 484 static ssize_t efivar_delete(struct file *filp, struct kobject *kobj, efivar_delete() argument 569 new_var->kobj.kset = efivars_kset; efivar_create_sysfs_entry() 571 ret = kobject_init_and_add(&new_var->kobj, &efivar_ktype, efivar_create_sysfs_entry() 577 kobject_uevent(&new_var->kobj, KOBJ_ADD); efivar_create_sysfs_entry() 614 error = sysfs_create_bin_file(&efivars_kset->kobj, efivars_new_var); create_efivars_bin_attributes() 621 error = sysfs_create_bin_file(&efivars_kset->kobj, efivars_del_var); create_efivars_bin_attributes() 625 sysfs_remove_bin_file(&efivars_kset->kobj, efivars_new_var); create_efivars_bin_attributes() 704 sysfs_remove_bin_file(&efivars_kset->kobj, efivars_new_var); efivars_sysfs_exit() 706 sysfs_remove_bin_file(&efivars_kset->kobj, efivars_del_var); efivars_sysfs_exit()
|
/linux-4.4.14/drivers/w1/slaves/ |
H A D | w1_ds2408.c | 75 static ssize_t state_read(struct file *filp, struct kobject *kobj, state_read() argument 79 dev_dbg(&kobj_to_w1_slave(kobj)->dev, state_read() 80 "Reading %s kobj: %p, off: %0#10x, count: %zu, buff addr: %p", state_read() 81 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); state_read() 84 return _read_reg(kobj_to_w1_slave(kobj), W1_F29_REG_LOGIG_STATE, buf); state_read() 87 static ssize_t output_read(struct file *filp, struct kobject *kobj, output_read() argument 91 dev_dbg(&kobj_to_w1_slave(kobj)->dev, output_read() 92 "Reading %s kobj: %p, off: %0#10x, count: %zu, buff addr: %p", output_read() 93 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); output_read() 96 return _read_reg(kobj_to_w1_slave(kobj), output_read() 100 static ssize_t activity_read(struct file *filp, struct kobject *kobj, activity_read() argument 104 dev_dbg(&kobj_to_w1_slave(kobj)->dev, activity_read() 105 "Reading %s kobj: %p, off: %0#10x, count: %zu, buff addr: %p", activity_read() 106 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); activity_read() 109 return _read_reg(kobj_to_w1_slave(kobj), activity_read() 113 static ssize_t cond_search_mask_read(struct file *filp, struct kobject *kobj, cond_search_mask_read() argument 117 dev_dbg(&kobj_to_w1_slave(kobj)->dev, cond_search_mask_read() 118 "Reading %s kobj: %p, off: %0#10x, count: %zu, buff addr: %p", cond_search_mask_read() 119 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); cond_search_mask_read() 122 return _read_reg(kobj_to_w1_slave(kobj), cond_search_mask_read() 127 struct kobject *kobj, cond_search_polarity_read() 133 return _read_reg(kobj_to_w1_slave(kobj), cond_search_polarity_read() 137 static ssize_t status_control_read(struct file *filp, struct kobject *kobj, status_control_read() argument 143 return _read_reg(kobj_to_w1_slave(kobj), status_control_read() 147 static ssize_t output_write(struct file *filp, struct kobject *kobj, output_write() argument 151 struct w1_slave *sl = kobj_to_w1_slave(kobj); output_write() 218 static ssize_t activity_write(struct file *filp, struct kobject *kobj, activity_write() argument 222 struct w1_slave *sl = kobj_to_w1_slave(kobj); activity_write() 248 static ssize_t status_control_write(struct file *filp, struct kobject *kobj, status_control_write() argument 252 struct w1_slave *sl = kobj_to_w1_slave(kobj); status_control_write() 126 cond_search_polarity_read(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) cond_search_polarity_read() argument
|
H A D | w1_ds2406.c | 32 struct file *filp, struct kobject *kobj, w1_f12_read_state() 37 struct w1_slave *sl = kobj_to_w1_slave(kobj); w1_f12_read_state() 69 struct file *filp, struct kobject *kobj, w1_f12_write_output() 73 struct w1_slave *sl = kobj_to_w1_slave(kobj); w1_f12_write_output() 130 &sl->dev.kobj, w1_f12_add_slave() 134 sysfs_remove_bin_file(&sl->dev.kobj, w1_f12_add_slave() 143 sysfs_remove_bin_file(&sl->dev.kobj, w1_f12_remove_slave() 31 w1_f12_read_state( struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) w1_f12_read_state() argument 68 w1_f12_write_output( struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) w1_f12_write_output() argument
|
H A D | w1_ds2413.c | 33 static ssize_t state_read(struct file *filp, struct kobject *kobj, state_read() argument 37 struct w1_slave *sl = kobj_to_w1_slave(kobj); state_read() 39 "Reading %s kobj: %p, off: %0#10x, count: %zu, buff addr: %p", state_read() 40 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); state_read() 70 static ssize_t output_write(struct file *filp, struct kobject *kobj, output_write() argument 74 struct w1_slave *sl = kobj_to_w1_slave(kobj); output_write()
|
H A D | w1_ds2780.c | 92 static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj, w1_slave_read() argument 96 struct device *dev = container_of(kobj, struct device, kobj); w1_slave_read()
|
H A D | w1_ds2781.c | 90 static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj, w1_slave_read() argument 94 struct device *dev = container_of(kobj, struct device, kobj); w1_slave_read()
|
H A D | w1_ds28e04.c | 121 static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, eeprom_read() argument 125 struct w1_slave *sl = kobj_to_w1_slave(kobj); eeprom_read() 229 static ssize_t eeprom_write(struct file *filp, struct kobject *kobj, eeprom_write() argument 234 struct w1_slave *sl = kobj_to_w1_slave(kobj); eeprom_write() 285 static ssize_t pio_read(struct file *filp, struct kobject *kobj, pio_read() argument 290 struct w1_slave *sl = kobj_to_w1_slave(kobj); pio_read() 304 static ssize_t pio_write(struct file *filp, struct kobject *kobj, pio_write() argument 309 struct w1_slave *sl = kobj_to_w1_slave(kobj); pio_write()
|
H A D | w1_ds2760.c | 100 static ssize_t w1_slave_read(struct file *filp, struct kobject *kobj, w1_slave_read() argument 104 struct device *dev = container_of(kobj, struct device, kobj); w1_slave_read()
|
/linux-4.4.14/drivers/cpuidle/ |
H A D | sysfs.c | 151 return sysfs_create_group(&dev->kobj, &cpuidle_attr_group); cpuidle_add_interface() 159 sysfs_remove_group(&dev->kobj, &cpuidle_attr_group); cpuidle_remove_interface() 178 struct kobject kobj; member in struct:cpuidle_device_kobj 181 static inline struct cpuidle_device *to_cpuidle_device(struct kobject *kobj) to_cpuidle_device() argument 184 container_of(kobj, struct cpuidle_device_kobj, kobj); to_cpuidle_device() 189 static ssize_t cpuidle_show(struct kobject *kobj, struct attribute *attr, cpuidle_show() argument 193 struct cpuidle_device *dev = to_cpuidle_device(kobj); cpuidle_show() 204 static ssize_t cpuidle_store(struct kobject *kobj, struct attribute *attr, cpuidle_store() argument 208 struct cpuidle_device *dev = to_cpuidle_device(kobj); cpuidle_store() 224 static void cpuidle_sysfs_release(struct kobject *kobj) cpuidle_sysfs_release() argument 227 container_of(kobj, struct cpuidle_device_kobj, kobj); cpuidle_sysfs_release() 330 struct kobject kobj; member in struct:cpuidle_state_kobj 333 #define kobj_to_state_obj(k) container_of(k, struct cpuidle_state_kobj, kobj) 338 static ssize_t cpuidle_state_show(struct kobject *kobj, struct attribute *attr, cpuidle_state_show() argument 342 struct cpuidle_state *state = kobj_to_state(kobj); cpuidle_state_show() 343 struct cpuidle_state_usage *state_usage = kobj_to_state_usage(kobj); cpuidle_state_show() 352 static ssize_t cpuidle_state_store(struct kobject *kobj, struct attribute *attr, cpuidle_state_store() argument 356 struct cpuidle_state *state = kobj_to_state(kobj); cpuidle_state_store() 357 struct cpuidle_state_usage *state_usage = kobj_to_state_usage(kobj); cpuidle_state_store() 371 static void cpuidle_state_sysfs_release(struct kobject *kobj) cpuidle_state_sysfs_release() argument 373 struct cpuidle_state_kobj *state_obj = kobj_to_state_obj(kobj); cpuidle_state_sysfs_release() 386 kobject_put(&device->kobjs[i]->kobj); cpuidle_free_state_kobj() 399 struct cpuidle_state_kobj *kobj; cpuidle_add_state_sysfs() local 405 kobj = kzalloc(sizeof(struct cpuidle_state_kobj), GFP_KERNEL); cpuidle_add_state_sysfs() 406 if (!kobj) cpuidle_add_state_sysfs() 408 kobj->state = &drv->states[i]; cpuidle_add_state_sysfs() 409 kobj->state_usage = &device->states_usage[i]; cpuidle_add_state_sysfs() 410 init_completion(&kobj->kobj_unregister); cpuidle_add_state_sysfs() 412 ret = kobject_init_and_add(&kobj->kobj, &ktype_state_cpuidle, cpuidle_add_state_sysfs() 413 &kdev->kobj, "state%d", i); cpuidle_add_state_sysfs() 415 kfree(kobj); cpuidle_add_state_sysfs() 418 kobject_uevent(&kobj->kobj, KOBJ_ADD); cpuidle_add_state_sysfs() 419 device->kobjs[i] = kobj; cpuidle_add_state_sysfs() 444 #define kobj_to_driver_kobj(k) container_of(k, struct cpuidle_driver_kobj, kobj) 454 struct kobject kobj; member in struct:cpuidle_driver_kobj 474 static void cpuidle_driver_sysfs_release(struct kobject *kobj) cpuidle_driver_sysfs_release() argument 476 struct cpuidle_driver_kobj *driver_kobj = kobj_to_driver_kobj(kobj); cpuidle_driver_sysfs_release() 480 static ssize_t cpuidle_driver_show(struct kobject *kobj, struct attribute *attr, cpuidle_driver_show() argument 484 struct cpuidle_driver_kobj *driver_kobj = kobj_to_driver_kobj(kobj); cpuidle_driver_show() 493 static ssize_t cpuidle_driver_store(struct kobject *kobj, struct attribute *attr, cpuidle_driver_store() argument 497 struct cpuidle_driver_kobj *driver_kobj = kobj_to_driver_kobj(kobj); cpuidle_driver_store() 542 ret = kobject_init_and_add(&kdrv->kobj, &ktype_driver_cpuidle, cpuidle_add_driver_sysfs() 543 &kdev->kobj, "driver"); cpuidle_add_driver_sysfs() 549 kobject_uevent(&kdrv->kobj, KOBJ_ADD); cpuidle_add_driver_sysfs() 562 kobject_put(&kdrv->kobj); cpuidle_remove_driver_sysfs() 624 error = kobject_init_and_add(&kdev->kobj, &ktype_cpuidle, &cpu_dev->kobj, cpuidle_add_sysfs() 631 kobject_uevent(&kdev->kobj, KOBJ_ADD); cpuidle_add_sysfs() 644 kobject_put(&kdev->kobj); cpuidle_remove_sysfs()
|
/linux-4.4.14/drivers/edac/ |
H A D | edac_device_sysfs.c | 23 #define to_edacdev(k) container_of(k, struct edac_device_ctl_info, kobj) 113 #define to_ctl_info(k) container_of(k, struct edac_device_ctl_info, kobj) 117 static ssize_t edac_dev_ctl_info_show(struct kobject *kobj, edac_dev_ctl_info_show() argument 120 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); edac_dev_ctl_info_show() 129 static ssize_t edac_dev_ctl_info_store(struct kobject *kobj, edac_dev_ctl_info_store() argument 133 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); edac_dev_ctl_info_store() 177 * called when the reference count for the 'main' kobj 182 * That main kobj is initially set to one AND 186 * Each new internal kobj (in instances and blocks) then 190 * the 'main' kobj. 192 * When the main kobj reaches zero (0) then THIS function 199 * with its own 'main' kobj. 201 static void edac_device_ctrl_master_release(struct kobject *kobj) edac_device_ctrl_master_release() argument 203 struct edac_device_ctl_info *edac_dev = to_edacdev(kobj); edac_device_ctrl_master_release() 210 /* free the control struct containing the 'main' kobj edac_device_ctrl_master_release() 250 memset(&edac_dev->kobj, 0, sizeof(struct kobject)); edac_device_register_sysfs_main_kobj() 263 err = kobject_init_and_add(&edac_dev->kobj, &ktype_device_ctrl, edac_device_register_sysfs_main_kobj() 264 &edac_subsys->dev_root->kobj, edac_device_register_sysfs_main_kobj() 271 kobject_uevent(&edac_dev->kobj, KOBJ_ADD); edac_device_register_sysfs_main_kobj() 299 edac_dbg(4, "name of kobject is: %s\n", kobject_name(&dev->kobj)); edac_device_unregister_sysfs_main_kobj() 308 kobject_put(&dev->kobj); edac_device_unregister_sysfs_main_kobj() 329 #define to_instance(k) container_of(k, struct edac_device_instance, kobj) 333 static void edac_device_ctrl_instance_release(struct kobject *kobj) edac_device_ctrl_instance_release() argument 339 /* map from this kobj to the main control struct edac_device_ctrl_instance_release() 340 * and then dec the main kobj count edac_device_ctrl_instance_release() 342 instance = to_instance(kobj); edac_device_ctrl_instance_release() 343 kobject_put(&instance->ctl->kobj); edac_device_ctrl_instance_release() 354 static ssize_t edac_dev_instance_show(struct kobject *kobj, edac_dev_instance_show() argument 357 struct edac_device_instance *instance = to_instance(kobj); edac_dev_instance_show() 366 static ssize_t edac_dev_instance_store(struct kobject *kobj, edac_dev_instance_store() argument 370 struct edac_device_instance *instance = to_instance(kobj); edac_dev_instance_store() 415 #define to_block(k) container_of(k, struct edac_device_block, kobj) 422 static ssize_t block_ue_count_show(struct kobject *kobj, block_ue_count_show() argument 425 struct edac_device_block *block = to_block(kobj); block_ue_count_show() 430 static ssize_t block_ce_count_show(struct kobject *kobj, block_ce_count_show() argument 433 struct edac_device_block *block = to_block(kobj); block_ce_count_show() 439 static void edac_device_ctrl_block_release(struct kobject *kobj) edac_device_ctrl_block_release() argument 445 /* get the container of the kobj */ edac_device_ctrl_block_release() 446 block = to_block(kobj); edac_device_ctrl_block_release() 448 /* map from 'block kobj' to 'block->instance->controller->main_kobj' edac_device_ctrl_block_release() 451 kobject_put(&block->instance->ctl->kobj); edac_device_ctrl_block_release() 456 static ssize_t edac_dev_block_show(struct kobject *kobj, edac_dev_block_show() argument 463 return block_attr->show(kobj, attr, buffer); edac_dev_block_show() 468 static ssize_t edac_dev_block_store(struct kobject *kobj, edac_dev_block_store() argument 477 return block_attr->store(kobj, attr, buffer, count); edac_dev_block_store() 527 edac_dbg(4, "block kobj=%p block kobj->parent=%p\n", edac_device_create_block() 528 &block->kobj, &block->kobj.parent); edac_device_create_block() 531 memset(&block->kobj, 0, sizeof(struct kobject)); edac_device_create_block() 536 main_kobj = kobject_get(&edac_dev->kobj); edac_device_create_block() 543 err = kobject_init_and_add(&block->kobj, &ktype_block_ctrl, edac_device_create_block() 544 &instance->kobj, edac_device_create_block() 560 edac_dbg(4, "creating block attrib='%s' attrib->%p to kobj=%p\n", edac_device_create_block() 562 sysfs_attrib, &block->kobj); edac_device_create_block() 565 err = sysfs_create_file(&block->kobj, edac_device_create_block() 571 kobject_uevent(&block->kobj, KOBJ_ADD); edac_device_create_block() 577 kobject_put(&block->kobj); edac_device_create_block() 600 sysfs_remove_file(&block->kobj, edac_device_delete_block() 608 kobject_put(&block->kobj); edac_device_delete_block() 628 memset(&instance->kobj, 0, sizeof(struct kobject)); edac_device_create_instance() 635 main_kobj = kobject_get(&edac_dev->kobj); edac_device_create_instance() 642 err = kobject_init_and_add(&instance->kobj, &ktype_instance_ctrl, edac_device_create_instance() 643 &edac_dev->kobj, "%s", instance->name); edac_device_create_instance() 666 kobject_uevent(&instance->kobj, KOBJ_ADD); edac_device_create_instance() 675 kobject_put(&instance->kobj); edac_device_create_instance() 700 kobject_put(&instance->kobj); edac_device_delete_instance() 760 err = sysfs_create_file(&edac_dev->kobj, edac_device_add_main_sysfs_attributes() 789 sysfs_remove_file(&edac_dev->kobj, edac_device_remove_main_sysfs_attributes() 800 * and 'export' it to sysfs. The 'main' kobj should already have been 813 struct kobject *edac_kobj = &edac_dev->kobj; edac_device_create_sysfs() 828 &edac_dev->dev->kobj, EDAC_DEVICE_SYMLINK); edac_device_create_sysfs() 853 sysfs_remove_link(&edac_dev->kobj, EDAC_DEVICE_SYMLINK); edac_device_create_sysfs() 875 sysfs_remove_link(&edac_dev->kobj, EDAC_DEVICE_SYMLINK); edac_device_remove_sysfs()
|
H A D | edac_pci_sysfs.c | 70 #define to_instance(k) container_of(k, struct edac_pci_ctl_info, kobj) 74 static void edac_pci_instance_release(struct kobject *kobj) edac_pci_instance_release() argument 81 pci = to_instance(kobj); edac_pci_instance_release() 83 /* decrement reference count on top main kobj */ edac_pci_instance_release() 97 static ssize_t edac_pci_instance_show(struct kobject *kobj, edac_pci_instance_show() argument 100 struct edac_pci_ctl_info *pci = to_instance(kobj); edac_pci_instance_show() 109 static ssize_t edac_pci_instance_store(struct kobject *kobj, edac_pci_instance_store() argument 113 struct edac_pci_ctl_info *pci = to_instance(kobj); edac_pci_instance_store() 163 /* First bump the ref count on the top main kobj, which will edac_pci_create_instance_kobj() 173 /* And now register this new kobject under the main kobj */ edac_pci_create_instance_kobj() 174 err = kobject_init_and_add(&pci->kobj, &ktype_pci_instance, edac_pci_create_instance_kobj() 182 kobject_uevent(&pci->kobj, KOBJ_ADD); edac_pci_create_instance_kobj() 195 * unregister the kobj for the EDAC PCI instance 206 kobject_put(&pci->kobj); edac_pci_unregister_sysfs_instance_kobj() 210 #define to_edacpci(k) container_of(k, struct edac_pci_ctl_info, kobj) 238 static ssize_t edac_pci_dev_show(struct kobject *kobj, struct attribute *attr, edac_pci_dev_show() argument 249 static ssize_t edac_pci_dev_store(struct kobject *kobj, edac_pci_dev_store() argument 309 * passed kobj goes to zero. 311 * This kobj is the 'main' kobject that EDAC PCI instances 314 static void edac_pci_release_main_kobj(struct kobject *kobj) edac_pci_release_main_kobj() argument 318 kfree(kobj); edac_pci_release_main_kobj() 326 /* ktype struct for the EDAC PCI main kobj */ 362 * level main kobj for EDAC PCI edac_pci_main_kobj_setup() 380 &edac_subsys->dev_root->kobj, "pci"); edac_pci_main_kobj_setup() 424 * main kobj edac_pci_main_kobj_teardown() 427 edac_dbg(0, "called kobject_put on main kobj\n"); edac_pci_main_kobj_teardown() 442 struct kobject *edac_kobj = &pci->kobj; edac_pci_create_sysfs() 456 err = sysfs_create_link(edac_kobj, &pci->dev->kobj, EDAC_PCI_SYMLINK); edac_pci_create_sysfs() 484 sysfs_remove_link(&pci->kobj, EDAC_PCI_SYMLINK); edac_pci_remove_sysfs()
|
/linux-4.4.14/drivers/base/ |
H A D | module.c | 30 mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); module_create_drivers_dir() 50 mk = container_of(mkobj, struct module_kobject, kobj); module_add_driver() 62 no_warn = sysfs_create_link(&drv->p->kobj, &mk->kobj, "module"); module_add_driver() 66 no_warn = sysfs_create_link(mk->drivers_dir, &drv->p->kobj, module_add_driver() 80 sysfs_remove_link(&drv->p->kobj, "module"); module_remove_driver()
|
H A D | core.c | 113 static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, dev_attr_show() argument 117 struct device *dev = kobj_to_dev(kobj); dev_attr_show() 129 static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr, dev_attr_store() argument 133 struct device *dev = kobj_to_dev(kobj); dev_attr_store() 220 * @kobj: device's kobject. 226 static void device_release(struct kobject *kobj) device_release() argument 228 struct device *dev = kobj_to_dev(kobj); device_release() 255 static const void *device_namespace(struct kobject *kobj) device_namespace() argument 257 struct device *dev = kobj_to_dev(kobj); device_namespace() 273 static int dev_uevent_filter(struct kset *kset, struct kobject *kobj) dev_uevent_filter() argument 275 struct kobj_type *ktype = get_ktype(kobj); dev_uevent_filter() 278 struct device *dev = kobj_to_dev(kobj); dev_uevent_filter() 287 static const char *dev_uevent_name(struct kset *kset, struct kobject *kobj) dev_uevent_name() argument 289 struct device *dev = kobj_to_dev(kobj); dev_uevent_name() 298 static int dev_uevent(struct kset *kset, struct kobject *kobj, dev_uevent() argument 301 struct device *dev = kobj_to_dev(kobj); dev_uevent() 382 top_kobj = &dev->kobj; uevent_show() 394 if (!kset->uevent_ops->filter(kset, &dev->kobj)) uevent_show() 402 retval = kset->uevent_ops->uevent(kset, &dev->kobj, env); uevent_show() 420 kobject_uevent(&dev->kobj, action); uevent_store() 460 return sysfs_create_groups(&dev->kobj, groups); device_add_groups() 466 sysfs_remove_groups(&dev->kobj, groups); device_remove_groups() 548 list_move_tail(&deva->kobj.entry, &devb->kobj.entry); devices_kset_move_before() 564 list_move(&deva->kobj.entry, &devb->kobj.entry); devices_kset_move_after() 578 list_move_tail(&dev->kobj.entry, &devices_kset->list); devices_kset_move_last() 599 error = sysfs_create_file(&dev->kobj, &attr->attr); device_create_file() 615 sysfs_remove_file(&dev->kobj, &attr->attr); device_remove_file() 630 return sysfs_remove_file_self(&dev->kobj, &attr->attr); device_remove_file_self() 646 error = sysfs_create_bin_file(&dev->kobj, attr); device_create_bin_file() 660 sysfs_remove_bin_file(&dev->kobj, attr); device_remove_bin_file() 702 dev->kobj.kset = devices_kset; device_initialize() 703 kobject_init(&dev->kobj, &device_ktype); device_initialize() 723 &devices_kset->kobj); virtual_device_parent() 729 struct kobject kobj; member in struct:class_dir 733 #define to_class_dir(obj) container_of(obj, struct class_dir, kobj) 735 static void class_dir_release(struct kobject *kobj) class_dir_release() argument 737 struct class_dir *dir = to_class_dir(kobj); class_dir_release() 742 struct kobj_ns_type_operations *class_dir_child_ns_type(struct kobject *kobj) class_dir_child_ns_type() argument 744 struct class_dir *dir = to_class_dir(kobj); class_dir_child_ns_type() 765 kobject_init(&dir->kobj, &class_dir_ktype); class_dir_create_and_add() 767 dir->kobj.kset = &class->p->glue_dirs; class_dir_create_and_add() 769 retval = kobject_add(&dir->kobj, parent_kobj, "%s", class->name); class_dir_create_and_add() 771 kobject_put(&dir->kobj); class_dir_create_and_add() 774 return &dir->kobj; class_dir_create_and_add() 783 struct kobject *kobj = NULL; get_device_parent() local 791 return &parent->kobj; get_device_parent() 792 return &block_class.p->subsys.kobj; get_device_parent() 804 return &parent->kobj; get_device_parent() 806 parent_kobj = &parent->kobj; get_device_parent() 814 kobj = kobject_get(k); get_device_parent() 818 if (kobj) { get_device_parent() 820 return kobj; get_device_parent() 832 return &dev->bus->dev_root->kobj; get_device_parent() 835 return &parent->kobj; get_device_parent() 853 cleanup_glue_dir(dev, dev->kobj.parent); cleanup_device_parent() 862 error = sysfs_create_link(&dev->kobj, &of_node->kobj,"of_node"); device_add_class_symlinks() 871 error = sysfs_create_link(&dev->kobj, device_add_class_symlinks() 872 &dev->class->p->subsys.kobj, device_add_class_symlinks() 878 error = sysfs_create_link(&dev->kobj, &dev->parent->kobj, device_add_class_symlinks() 891 error = sysfs_create_link(&dev->class->p->subsys.kobj, device_add_class_symlinks() 892 &dev->kobj, dev_name(dev)); device_add_class_symlinks() 899 sysfs_remove_link(&dev->kobj, "device"); device_add_class_symlinks() 902 sysfs_remove_link(&dev->kobj, "subsystem"); device_add_class_symlinks() 904 sysfs_remove_link(&dev->kobj, "of_node"); device_add_class_symlinks() 911 sysfs_remove_link(&dev->kobj, "of_node"); device_remove_class_symlinks() 917 sysfs_remove_link(&dev->kobj, "device"); device_remove_class_symlinks() 918 sysfs_remove_link(&dev->kobj, "subsystem"); device_remove_class_symlinks() 923 sysfs_delete_link(&dev->class->p->subsys.kobj, &dev->kobj, dev_name(dev)); device_remove_class_symlinks() 937 err = kobject_set_name_vargs(&dev->kobj, fmt, vargs); dev_set_name() 956 struct kobject *kobj; device_to_dev_kobj() local 959 kobj = dev->class->dev_kobj; device_to_dev_kobj() 961 kobj = sysfs_dev_char_kobj; device_to_dev_kobj() 963 return kobj; device_to_dev_kobj() 968 struct kobject *kobj = device_to_dev_kobj(dev); device_create_sys_dev_entry() local 972 if (kobj) { device_create_sys_dev_entry() 974 error = sysfs_create_link(kobj, &dev->kobj, devt_str); device_create_sys_dev_entry() 982 struct kobject *kobj = device_to_dev_kobj(dev); device_remove_sys_dev_entry() local 985 if (kobj) { device_remove_sys_dev_entry() 987 sysfs_remove_link(kobj, devt_str); device_remove_sys_dev_entry() 1028 struct kobject *kobj; device_add() local 1064 kobj = get_device_parent(dev, parent); device_add() 1065 if (kobj) device_add() 1066 dev->kobj.parent = kobj; device_add() 1074 error = kobject_add(&dev->kobj, dev->kobj.parent, NULL); device_add() 1119 kobject_uevent(&dev->kobj, KOBJ_ADD); device_add() 1156 kobject_uevent(&dev->kobj, KOBJ_REMOVE); device_add() 1157 kobject_del(&dev->kobj); device_add() 1203 return dev ? kobj_to_dev(kobject_get(&dev->kobj)) : NULL; get_device() 1215 kobject_put(&dev->kobj); put_device() 1278 kobject_uevent(&dev->kobj, KOBJ_REMOVE); device_del() 1280 kobject_del(&dev->kobj); device_del() 1536 kobject_uevent(&dev->kobj, KOBJ_OFFLINE); device_offline() 1565 kobject_uevent(&dev->kobj, KOBJ_ONLINE); device_online() 1641 err = sysfs_create_link(&root->dev.kobj, &mk->kobj, "module"); __root_device_register() 1666 sysfs_remove_link(&root->dev.kobj, "module"); root_device_unregister() 1705 retval = kobject_set_name_vargs(&dev->kobj, fmt, args); device_create_groups_vargs() 1903 struct kobject *kobj = &dev->kobj; device_rename() local 1920 error = sysfs_rename_link_ns(&dev->class->p->subsys.kobj, device_rename() 1921 kobj, old_device_name, device_rename() 1922 new_name, kobject_namespace(kobj)); device_rename() 1927 error = kobject_rename(kobj, new_name); device_rename() 1947 sysfs_remove_link(&dev->kobj, "device"); device_move_class_links() 1949 error = sysfs_create_link(&dev->kobj, &new_parent->kobj, device_move_class_links() 1977 error = kobject_move(&dev->kobj, new_parent_kobj); device_move() 1998 if (!kobject_move(&dev->kobj, &old_parent->kobj)) { device_move() 2053 kobj.entry); device_shutdown() 2066 list_del_init(&dev->kobj.entry); device_shutdown()
|
H A D | class.c | 26 static ssize_t class_attr_show(struct kobject *kobj, struct attribute *attr, class_attr_show() argument 30 struct subsys_private *cp = to_subsys_private(kobj); class_attr_show() 38 static ssize_t class_attr_store(struct kobject *kobj, struct attribute *attr, class_attr_store() argument 42 struct subsys_private *cp = to_subsys_private(kobj); class_attr_store() 50 static void class_release(struct kobject *kobj) class_release() argument 52 struct subsys_private *cp = to_subsys_private(kobj); class_release() 66 static const struct kobj_ns_type_operations *class_child_ns_type(struct kobject *kobj) class_child_ns_type() argument 68 struct subsys_private *cp = to_subsys_private(kobj); class_child_ns_type() 95 error = sysfs_create_file_ns(&cls->p->subsys.kobj, class_create_file_ns() 106 sysfs_remove_file_ns(&cls->p->subsys.kobj, &attr->attr, ns); class_remove_file_ns() 180 error = kobject_set_name(&cp->subsys.kobj, "%s", cls->name); __class_register() 193 cp->subsys.kobj.kset = class_kset; __class_register() 195 cp->subsys.kobj.kset = class_kset; __class_register() 197 cp->subsys.kobj.ktype = &class_ktype; __class_register() 500 struct kobject *kobj; member in struct:class_compat 517 cls->kobj = kobject_create_and_add(name, &class_kset->kobj); class_compat_register() 518 if (!cls->kobj) { class_compat_register() 532 kobject_put(cls->kobj); class_compat_unregister() 549 error = sysfs_create_link(cls->kobj, &dev->kobj, dev_name(dev)); class_compat_create_link() 559 error = sysfs_create_link(&dev->kobj, &device_link->kobj, class_compat_create_link() 562 sysfs_remove_link(cls->kobj, dev_name(dev)); class_compat_create_link() 581 sysfs_remove_link(&dev->kobj, "device"); class_compat_remove_link() 582 sysfs_remove_link(cls->kobj, dev_name(dev)); class_compat_remove_link()
|
H A D | devcoredump.c | 70 if (devcd->failing_dev->kobj.sd) devcd_dev_release() 71 sysfs_delete_link(&devcd->failing_dev->kobj, &dev->kobj, devcd_dev_release() 88 static ssize_t devcd_data_read(struct file *filp, struct kobject *kobj, devcd_data_read() argument 92 struct device *dev = kobj_to_dev(kobj); devcd_data_read() 98 static ssize_t devcd_data_write(struct file *filp, struct kobject *kobj, devcd_data_write() argument 102 struct device *dev = kobj_to_dev(kobj); devcd_data_write() 273 if (sysfs_create_link(&devcd->devcd_dev.kobj, &dev->kobj, dev_coredumpm() 277 if (sysfs_create_link(&dev->kobj, &devcd->devcd_dev.kobj, dev_coredumpm()
|
H A D | bus.c | 55 static ssize_t drv_attr_show(struct kobject *kobj, struct attribute *attr, drv_attr_show() argument 59 struct driver_private *drv_priv = to_driver(kobj); drv_attr_show() 67 static ssize_t drv_attr_store(struct kobject *kobj, struct attribute *attr, drv_attr_store() argument 71 struct driver_private *drv_priv = to_driver(kobj); drv_attr_store() 84 static void driver_release(struct kobject *kobj) driver_release() argument 86 struct driver_private *drv_priv = to_driver(kobj); driver_release() 88 pr_debug("driver: '%s': %s\n", kobject_name(kobj), __func__); driver_release() 100 static ssize_t bus_attr_show(struct kobject *kobj, struct attribute *attr, bus_attr_show() argument 104 struct subsys_private *subsys_priv = to_subsys_private(kobj); bus_attr_show() 112 static ssize_t bus_attr_store(struct kobject *kobj, struct attribute *attr, bus_attr_store() argument 116 struct subsys_private *subsys_priv = to_subsys_private(kobj); bus_attr_store() 133 error = sysfs_create_file(&bus->p->subsys.kobj, &attr->attr); bus_create_file() 144 sysfs_remove_file(&bus->p->subsys.kobj, &attr->attr); bus_remove_file() 150 static void bus_release(struct kobject *kobj) bus_release() argument 153 container_of(kobj, typeof(*priv), subsys.kobj); bus_release() 165 static int bus_uevent_filter(struct kset *kset, struct kobject *kobj) bus_uevent_filter() argument 167 struct kobj_type *ktype = get_ktype(kobj); bus_uevent_filter() 520 error = sysfs_create_link(&bus->p->devices_kset->kobj, bus_add_device() 521 &dev->kobj, dev_name(dev)); bus_add_device() 524 error = sysfs_create_link(&dev->kobj, bus_add_device() 525 &dev->bus->p->subsys.kobj, "subsystem"); bus_add_device() 533 sysfs_remove_link(&bus->p->devices_kset->kobj, dev_name(dev)); bus_add_device() 591 sysfs_remove_link(&dev->kobj, "subsystem"); bus_remove_device() 592 sysfs_remove_link(&dev->bus->p->devices_kset->kobj, bus_remove_device() 655 kobject_uevent(&drv->p->kobj, action); uevent_store() 695 priv->kobj.kset = bus->p->drivers_kset; bus_add_driver() 696 error = kobject_init_and_add(&priv->kobj, &driver_ktype, NULL, bus_add_driver() 739 kobject_put(&priv->kobj); bus_add_driver() 768 kobject_put(&drv->p->kobj); bus_remove_driver() 844 return sysfs_create_groups(&bus->p->subsys.kobj, groups); bus_add_groups() 850 sysfs_remove_groups(&bus->p->subsys.kobj, groups); bus_remove_groups() 875 kobject_uevent(&bus->p->subsys.kobj, action); bus_uevent_store() 903 retval = kobject_set_name(&priv->subsys.kobj, "%s", bus->name); bus_register() 907 priv->subsys.kobj.kset = bus_kset; bus_register() 908 priv->subsys.kobj.ktype = &bus_ktype; bus_register() 920 &priv->subsys.kobj); bus_register() 927 &priv->subsys.kobj); bus_register() 1208 dev->kobj.parent = parent_of_root; subsys_register() 1250 return subsys_register(subsys, groups, &system_kset->kobj); subsys_system_register() 1284 system_kset = kset_create_and_add("system", NULL, &devices_kset->kobj); buses_init()
|
H A D | map.c | 97 struct kobject *kobj; kobj_lookup() local 124 kobj = probe(dev, index, data); kobj_lookup() 127 if (kobj) kobj_lookup() 128 return kobj; kobj_lookup()
|
H A D | node.c | 329 ret = sysfs_create_link(&node_devices[nid]->dev.kobj, register_cpu_under_node() 330 &obj->kobj, register_cpu_under_node() 331 kobject_name(&obj->kobj)); register_cpu_under_node() 335 return sysfs_create_link(&obj->kobj, register_cpu_under_node() 336 &node_devices[nid]->dev.kobj, register_cpu_under_node() 337 kobject_name(&node_devices[nid]->dev.kobj)); register_cpu_under_node() 351 sysfs_remove_link(&node_devices[nid]->dev.kobj, unregister_cpu_under_node() 352 kobject_name(&obj->kobj)); unregister_cpu_under_node() 353 sysfs_remove_link(&obj->kobj, unregister_cpu_under_node() 354 kobject_name(&node_devices[nid]->dev.kobj)); unregister_cpu_under_node() 410 ret = sysfs_create_link_nowarn(&node_devices[nid]->dev.kobj, register_mem_sect_under_node() 411 &mem_blk->dev.kobj, register_mem_sect_under_node() 412 kobject_name(&mem_blk->dev.kobj)); register_mem_sect_under_node() 416 return sysfs_create_link_nowarn(&mem_blk->dev.kobj, register_mem_sect_under_node() 417 &node_devices[nid]->dev.kobj, register_mem_sect_under_node() 418 kobject_name(&node_devices[nid]->dev.kobj)); register_mem_sect_under_node() 451 sysfs_remove_link(&node_devices[nid]->dev.kobj, unregister_mem_sect_under_nodes() 452 kobject_name(&mem_blk->dev.kobj)); unregister_mem_sect_under_nodes() 453 sysfs_remove_link(&mem_blk->dev.kobj, unregister_mem_sect_under_nodes() 454 kobject_name(&node_devices[nid]->dev.kobj)); unregister_mem_sect_under_nodes() 493 kobject_put(&mem_blk->dev.kobj); link_mem_sections()
|
H A D | soc.c | 44 static umode_t soc_attribute_mode(struct kobject *kobj, soc_attribute_mode() argument 48 struct device *dev = container_of(kobj, struct device, kobj); soc_attribute_mode()
|
H A D | base.h | 44 #define to_subsys_private(obj) container_of(obj, struct subsys_private, subsys.kobj) 47 struct kobject kobj; member in struct:driver_private 53 #define to_driver(obj) container_of(obj, struct driver_private, kobj) 131 extern char *make_class_name(const char *name, struct kobject *kobj);
|
H A D | driver.c | 108 error = sysfs_create_file(&drv->p->kobj, &attr->attr); driver_create_file() 124 sysfs_remove_file(&drv->p->kobj, &attr->attr); driver_remove_file() 131 return sysfs_create_groups(&drv->p->kobj, groups); driver_add_groups() 137 sysfs_remove_groups(&drv->p->kobj, groups); driver_remove_groups() 176 kobject_uevent(&drv->p->kobj, KOBJ_ADD); driver_register()
|
H A D | topology.c | 105 return sysfs_create_group(&dev->kobj, &topology_attr_group); topology_add_dev() 112 sysfs_remove_group(&dev->kobj, &topology_attr_group); topology_remove_dev()
|
/linux-4.4.14/drivers/md/ |
H A D | dm-sysfs.c | 21 static ssize_t dm_attr_show(struct kobject *kobj, struct attribute *attr, dm_attr_show() argument 32 md = dm_get_from_kobject(kobj); dm_attr_show() 46 static ssize_t dm_attr_store(struct kobject *kobj, struct attribute *attr, dm_attr_store() argument 57 md = dm_get_from_kobject(kobj); dm_attr_store() 126 * Initialize kobj 132 &disk_to_dev(dm_disk(md))->kobj, dm_sysfs_init() 137 * Remove kobj, called after all references removed 141 struct kobject *kobj = dm_kobject(md); dm_sysfs_exit() local 142 kobject_put(kobj); dm_sysfs_exit() 143 wait_for_completion(dm_get_completion_from_kobject(kobj)); dm_sysfs_exit()
|
H A D | dm-uevent.h | 33 extern void dm_send_uevents(struct list_head *events, struct kobject *kobj); 48 struct kobject *kobj) dm_send_uevents() 47 dm_send_uevents(struct list_head *events, struct kobject *kobj) dm_send_uevents() argument
|
H A D | dm-builtin.c | 43 void dm_kobject_release(struct kobject *kobj) dm_kobject_release() argument 45 complete(dm_get_completion_from_kobject(kobj)); dm_kobject_release()
|
H A D | dm.h | 163 struct kobject kobj; member in struct:dm_kobject_holder 167 static inline struct completion *dm_get_completion_from_kobject(struct kobject *kobj) dm_get_completion_from_kobject() argument 169 return &container_of(kobj, struct dm_kobject_holder, kobj)->completion; dm_get_completion_from_kobject() 175 struct mapped_device *dm_get_from_kobject(struct kobject *kobj); 180 void dm_kobject_release(struct kobject *kobj);
|
H A D | dm-uevent.c | 131 * @kobj: kobject generating event 134 void dm_send_uevents(struct list_head *events, struct kobject *kobj) dm_send_uevents() argument 165 r = kobject_uevent_env(kobj, event->action, event->ku_env.envp); list_for_each_entry_safe()
|
/linux-4.4.14/sound/hda/ |
H A D | hdac_sysfs.c | 95 static int get_codec_nid(struct kobject *kobj, struct hdac_device **codecp) get_codec_nid() argument 97 struct device *dev = kobj_to_dev(kobj->parent->parent); get_codec_nid() 101 ret = kstrtoint(kobj->name, 16, &nid); get_codec_nid() 108 static ssize_t widget_attr_show(struct kobject *kobj, struct attribute *attr, widget_attr_show() argument 118 nid = get_codec_nid(kobj, &codec); widget_attr_show() 124 static ssize_t widget_attr_store(struct kobject *kobj, struct attribute *attr, widget_attr_store() argument 134 nid = get_codec_nid(kobj, &codec); widget_attr_store() 145 static void widget_release(struct kobject *kobj) widget_release() argument 147 kfree(kobj); widget_release() 310 static void free_widget_node(struct kobject *kobj, free_widget_node() argument 313 if (kobj) { free_widget_node() 314 sysfs_remove_group(kobj, group); free_widget_node() 315 kobject_put(kobj); free_widget_node() 341 struct kobject *kobj = kzalloc(sizeof(*kobj), GFP_KERNEL); add_widget_node() local 344 if (!kobj) add_widget_node() 346 kobject_init(kobj, &widget_ktype); add_widget_node() 347 err = kobject_add(kobj, parent, "%02x", nid); add_widget_node() 350 err = sysfs_create_group(kobj, group); add_widget_node() 352 kobject_put(kobj); add_widget_node() 356 *res = kobj; add_widget_node() 370 tree->root = kobject_create_and_add("widgets", &codec->dev.kobj); widget_tree_create()
|
/linux-4.4.14/drivers/md/bcache/ |
H A D | stats.c | 55 container_of(kobj, struct cache_stats, kobj); SHOW() 98 int ret = kobject_add(&acc->total.kobj, parent, bch_cache_accounting_add_kobjs() 100 ret = ret ?: kobject_add(&acc->five_minute.kobj, parent, bch_cache_accounting_add_kobjs() 102 ret = ret ?: kobject_add(&acc->hour.kobj, parent, bch_cache_accounting_add_kobjs() 104 ret = ret ?: kobject_add(&acc->day.kobj, parent, bch_cache_accounting_add_kobjs() 118 kobject_put(&acc->total.kobj); bch_cache_accounting_destroy() 119 kobject_put(&acc->five_minute.kobj); bch_cache_accounting_destroy() 120 kobject_put(&acc->hour.kobj); bch_cache_accounting_destroy() 121 kobject_put(&acc->day.kobj); bch_cache_accounting_destroy() 230 kobject_init(&acc->total.kobj, &bch_stats_ktype); bch_cache_accounting_init() 231 kobject_init(&acc->five_minute.kobj, &bch_stats_ktype); bch_cache_accounting_init() 232 kobject_init(&acc->hour.kobj, &bch_stats_ktype); bch_cache_accounting_init() 233 kobject_init(&acc->day.kobj, &bch_stats_ktype); bch_cache_accounting_init()
|
H A D | sysfs.c | 111 struct cached_dev *dc = container_of(kobj, struct cached_dev, SHOW() 112 disk.kobj); SHOW() 192 struct cached_dev *dc = container_of(kobj, struct cached_dev, SHOW_LOCKED() 193 disk.kobj); SHOW_LOCKED() 261 &disk_to_dev(dc->disk.disk)->kobj, KOBJ_CHANGE, env->envp); SHOW_LOCKED() 290 struct cached_dev *dc = container_of(kobj, struct cached_dev, STORE() 291 disk.kobj); STORE() 294 size = __cached_dev_store(kobj, attr, buf, size); STORE() 343 struct bcache_device *d = container_of(kobj, struct bcache_device, SHOW() 344 kobj); SHOW() 362 struct bcache_device *d = container_of(kobj, struct bcache_device, STORE() 363 kobj); STORE() 519 struct cache_set *c = container_of(kobj, struct cache_set, kobj); SHOW() 582 struct cache_set *c = container_of(kobj, struct cache_set, kobj); SHOW_LOCKED() 662 struct cache_set *c = container_of(kobj, struct cache_set, internal); STORE_LOCKED() 663 return bch_cache_set_show(&c->kobj, attr, buf); STORE_LOCKED() 668 struct cache_set *c = container_of(kobj, struct cache_set, internal); STORE() 669 return bch_cache_set_store(&c->kobj, attr, buf, size); STORE() 736 struct cache *ca = container_of(kobj, struct cache, kobj); SHOW() 843 struct cache *ca = container_of(kobj, struct cache, kobj); SHOW_LOCKED()
|
H A D | sysfs.h | 15 static ssize_t fn ## _show(struct kobject *kobj, struct attribute *attr,\ 19 static ssize_t fn ## _store(struct kobject *kobj, struct attribute *attr,\ 27 ret = __ ## fn ## _show(kobj, attr, buf); \ 37 ret = __ ## fn ## _store(kobj, attr, buf, size); \
|
H A D | super.c | 665 sysfs_remove_link(&d->c->kobj, d->name); bcache_device_unlink() 666 sysfs_remove_link(&d->kobj, "cache"); bcache_device_unlink() 685 WARN(sysfs_create_link(&d->kobj, &c->kobj, "cache") || bcache_device_link() 686 sysfs_create_link(&c->kobj, &d->kobj, d->name), bcache_device_link() 872 kobject_uevent_env(&disk_to_dev(d->disk)->kobj, KOBJ_CHANGE, env); bch_cached_dev_run() 876 if (sysfs_create_link(&d->kobj, &disk_to_dev(d->disk)->kobj, "dev") || bch_cached_dev_run() 877 sysfs_create_link(&disk_to_dev(d->disk)->kobj, &d->kobj, "bcache")) bch_cached_dev_run() 985 sysfs_remove_file(&dc->kobj, &sysfs_attach); bch_cached_dev_attach() 1044 void bch_cached_dev_release(struct kobject *kobj) bch_cached_dev_release() argument 1046 struct cached_dev *dc = container_of(kobj, struct cached_dev, bch_cached_dev_release() 1047 disk.kobj); bch_cached_dev_release() 1074 kobject_put(&dc->disk.kobj); cached_dev_free() 1087 kobject_del(&d->kobj); cached_dev_flush() 1102 kobject_init(&dc->disk.kobj, &bch_cached_dev_ktype); cached_dev_init() 1163 if (kobject_add(&dc->disk.kobj, &part_to_dev(bdev->bd_part)->kobj, register_bdev() 1166 if (bch_cache_accounting_add_kobjs(&dc->accounting, &dc->disk.kobj)) register_bdev() 1187 void bch_flash_dev_release(struct kobject *kobj) bch_flash_dev_release() argument 1189 struct bcache_device *d = container_of(kobj, struct bcache_device, bch_flash_dev_release() 1190 kobj); bch_flash_dev_release() 1200 kobject_put(&d->kobj); flash_dev_free() 1210 kobject_del(&d->kobj); flash_dev_flush() 1224 kobject_init(&d->kobj, &bch_flash_dev_ktype); flash_dev_run() 1233 if (kobject_add(&d->kobj, &disk_to_dev(d->disk)->kobj, "bcache")) flash_dev_run() 1240 kobject_put(&d->kobj); flash_dev_run() 1316 void bch_cache_set_release(struct kobject *kobj) bch_cache_set_release() argument 1318 struct cache_set *c = container_of(kobj, struct cache_set, kobj); bch_cache_set_release() 1340 kobject_put(&ca->kobj); for_each_cache() 1366 kobject_put(&c->kobj); 1382 kobject_del(&c->kobj); cache_set_flush() 1469 kobject_init(&c->kobj, &bch_cache_set_ktype); bch_cache_set_alloc() 1736 if (kobject_add(&c->kobj, bcache_kobj, "%pU", c->sb.set_uuid) || register_cache_set() 1737 kobject_add(&c->internal, &c->kobj, "internal")) register_cache_set() 1740 if (bch_cache_accounting_add_kobjs(&c->accounting, &c->kobj)) register_cache_set() 1748 if (sysfs_create_link(&ca->kobj, &c->kobj, "set") || register_cache_set() 1749 sysfs_create_link(&c->kobj, &ca->kobj, buf)) register_cache_set() 1760 kobject_get(&ca->kobj); register_cache_set() 1776 void bch_cache_release(struct kobject *kobj) bch_cache_release() argument 1778 struct cache *ca = container_of(kobj, struct cache, kobj); bch_cache_release() 1812 kobject_init(&ca->kobj, &bch_cache_ktype); cache_alloc() 1865 if (kobject_add(&ca->kobj, &part_to_dev(bdev->bd_part)->kobj, "bcache")) { register_cache() 1883 kobject_put(&ca->kobj); register_cache()
|
H A D | stats.h | 15 struct kobject kobj; member in struct:cache_stats
|
/linux-4.4.14/kernel/ |
H A D | ksysfs.c | 33 static ssize_t uevent_seqnum_show(struct kobject *kobj, uevent_seqnum_show() argument 42 static ssize_t uevent_helper_show(struct kobject *kobj, uevent_helper_show() argument 47 static ssize_t uevent_helper_store(struct kobject *kobj, uevent_helper_store() argument 63 static ssize_t profiling_show(struct kobject *kobj, profiling_show() argument 68 static ssize_t profiling_store(struct kobject *kobj, profiling_store() argument 94 static ssize_t kexec_loaded_show(struct kobject *kobj, kexec_loaded_show() argument 101 static ssize_t kexec_crash_loaded_show(struct kobject *kobj, kexec_crash_loaded_show() argument 108 static ssize_t kexec_crash_size_show(struct kobject *kobj, kexec_crash_size_show() argument 113 static ssize_t kexec_crash_size_store(struct kobject *kobj, kexec_crash_size_store() argument 128 static ssize_t vmcoreinfo_show(struct kobject *kobj, vmcoreinfo_show() argument 140 static ssize_t fscaps_show(struct kobject *kobj, fscaps_show() argument 148 static ssize_t rcu_expedited_show(struct kobject *kobj, rcu_expedited_show() argument 153 static ssize_t rcu_expedited_store(struct kobject *kobj, rcu_expedited_store() argument 171 static ssize_t notes_read(struct file *filp, struct kobject *kobj, notes_read() argument
|
H A D | params.c | 574 #define to_module_kobject(n) container_of(n, struct module_kobject, kobj) 765 err = sysfs_create_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); module_param_sysfs_setup() 781 sysfs_remove_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); module_param_sysfs_remove() 801 struct kobject *kobj; locate_module_kobject() local 804 kobj = kset_find_obj(module_kset, name); locate_module_kobject() 805 if (kobj) { locate_module_kobject() 806 mk = to_module_kobject(kobj); locate_module_kobject() 812 mk->kobj.kset = module_kset; locate_module_kobject() 813 err = kobject_init_and_add(&mk->kobj, &module_ktype, NULL, locate_module_kobject() 817 err = sysfs_create_file(&mk->kobj, &module_uevent.attr); locate_module_kobject() 820 kobject_put(&mk->kobj); locate_module_kobject() 827 kobject_get(&mk->kobj); locate_module_kobject() 846 sysfs_remove_group(&mk->kobj, &mk->mp->grp); kernel_add_sysfs_param() 851 err = sysfs_create_group(&mk->kobj, &mk->mp->grp); kernel_add_sysfs_param() 853 kobject_uevent(&mk->kobj, KOBJ_ADD); kernel_add_sysfs_param() 854 kobject_put(&mk->kobj); kernel_add_sysfs_param() 915 err = sysfs_create_file(&mk->kobj, &vattr->mattr.attr); version_sysfs_builtin() 917 kobject_uevent(&mk->kobj, KOBJ_ADD); version_sysfs_builtin() 918 kobject_put(&mk->kobj); version_sysfs_builtin() 925 static ssize_t module_attr_show(struct kobject *kobj, module_attr_show() argument 934 mk = to_module_kobject(kobj); module_attr_show() 944 static ssize_t module_attr_store(struct kobject *kobj, module_attr_store() argument 953 mk = to_module_kobject(kobj); module_attr_store() 968 static int uevent_filter(struct kset *kset, struct kobject *kobj) uevent_filter() argument 970 struct kobj_type *ktype = get_ktype(kobj); uevent_filter() 984 static void module_kobj_release(struct kobject *kobj) module_kobj_release() argument 986 struct module_kobject *mk = to_module_kobject(kobj); module_kobj_release()
|
/linux-4.4.14/net/batman-adv/ |
H A D | sysfs.c | 50 struct device *dev = container_of(obj->parent, struct device, kobj); batadv_kobj_to_netdev() 63 * batadv_vlan_kobj_to_batpriv - convert a vlan kobj in the associated batpriv 83 * batadv_kobj_to_vlan - convert a kobj in the associated softif_vlan struct 95 if (vlan_tmp->kobj != obj) batadv_kobj_to_vlan() 142 ssize_t batadv_store_##_name(struct kobject *kobj, \ 146 struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \ 154 ssize_t batadv_show_##_name(struct kobject *kobj, \ 157 struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \ 174 ssize_t batadv_store_##_name(struct kobject *kobj, \ 178 struct net_device *net_dev = batadv_kobj_to_netdev(kobj); \ 187 ssize_t batadv_show_##_name(struct kobject *kobj, \ 190 struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); \ 205 ssize_t batadv_store_vlan_##_name(struct kobject *kobj, \ 209 struct batadv_priv *bat_priv = batadv_vlan_kobj_to_batpriv(kobj);\ 211 kobj); \ 221 ssize_t batadv_show_vlan_##_name(struct kobject *kobj, \ 224 struct batadv_priv *bat_priv = batadv_vlan_kobj_to_batpriv(kobj);\ 226 kobj); \ 349 static ssize_t batadv_show_bat_algo(struct kobject *kobj, batadv_show_bat_algo() argument 352 struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); batadv_show_bat_algo() 364 static ssize_t batadv_show_gw_mode(struct kobject *kobj, struct attribute *attr, batadv_show_gw_mode() argument 367 struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); batadv_show_gw_mode() 388 static ssize_t batadv_store_gw_mode(struct kobject *kobj, batadv_store_gw_mode() argument 392 struct net_device *net_dev = batadv_kobj_to_netdev(kobj); batadv_store_gw_mode() 456 static ssize_t batadv_show_gw_bwidth(struct kobject *kobj, batadv_show_gw_bwidth() argument 459 struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); batadv_show_gw_bwidth() 469 static ssize_t batadv_store_gw_bwidth(struct kobject *kobj, batadv_store_gw_bwidth() argument 473 struct net_device *net_dev = batadv_kobj_to_netdev(kobj); batadv_store_gw_bwidth() 483 * @kobj: kobject representing the private mesh sysfs directory 490 static ssize_t batadv_show_isolation_mark(struct kobject *kobj, batadv_show_isolation_mark() argument 493 struct batadv_priv *bat_priv = batadv_kobj_to_batpriv(kobj); batadv_show_isolation_mark() 502 * @kobj: kobject representing the private mesh sysfs directory 509 static ssize_t batadv_store_isolation_mark(struct kobject *kobj, batadv_store_isolation_mark() argument 513 struct net_device *net_dev = batadv_kobj_to_netdev(kobj); batadv_store_isolation_mark() 625 struct kobject *batif_kobject = &dev->dev.kobj; batadv_sysfs_add_meshif() 692 vlan->kobj = kobject_create_and_add(vlan_subdir, batadv_sysfs_add_vlan() 694 if (!vlan->kobj) { batadv_sysfs_add_vlan() 703 vlan->kobj = bat_priv->mesh_obj; batadv_sysfs_add_vlan() 708 err = sysfs_create_file(vlan->kobj, batadv_sysfs_add_vlan() 722 sysfs_remove_file(vlan->kobj, &((*bat_attr)->attr)); batadv_sysfs_add_vlan() 724 kobject_put(vlan->kobj); batadv_sysfs_add_vlan() 725 vlan->kobj = NULL; batadv_sysfs_add_vlan() 741 sysfs_remove_file(vlan->kobj, &((*bat_attr)->attr)); batadv_sysfs_del_vlan() 743 kobject_put(vlan->kobj); batadv_sysfs_del_vlan() 744 vlan->kobj = NULL; batadv_sysfs_del_vlan() 747 static ssize_t batadv_show_mesh_iface(struct kobject *kobj, batadv_show_mesh_iface() argument 750 struct net_device *net_dev = batadv_kobj_to_netdev(kobj); batadv_show_mesh_iface() 771 static ssize_t batadv_store_mesh_iface(struct kobject *kobj, batadv_store_mesh_iface() argument 775 struct net_device *net_dev = batadv_kobj_to_netdev(kobj); batadv_store_mesh_iface() 828 static ssize_t batadv_show_iface_status(struct kobject *kobj, batadv_show_iface_status() argument 831 struct net_device *net_dev = batadv_kobj_to_netdev(kobj); batadv_show_iface_status() 875 struct kobject *hardif_kobject = &dev->dev.kobj; batadv_sysfs_add_hardif() 920 bat_kobj = &bat_priv->soft_iface->dev.kobj; batadv_throw_uevent()
|
H A D | sysfs.h | 40 ssize_t (*show)(struct kobject *kobj, struct attribute *attr, 42 ssize_t (*store)(struct kobject *kobj, struct attribute *attr,
|
/linux-4.4.14/drivers/net/bonding/ |
H A D | bond_sysfs_slave.c | 126 #define to_slave(obj) container_of(obj, struct slave, kobj) 128 static ssize_t slave_show(struct kobject *kobj, slave_show() argument 132 struct slave *slave = to_slave(kobj); slave_show() 152 err = kobject_init_and_add(&slave->kobj, &slave_ktype, bond_sysfs_slave_add() 153 &(slave->dev->dev.kobj), "bonding_slave"); bond_sysfs_slave_add() 158 err = sysfs_create_file(&slave->kobj, &((*a)->attr)); bond_sysfs_slave_add() 160 kobject_put(&slave->kobj); bond_sysfs_slave_add() 173 sysfs_remove_file(&slave->kobj, &((*a)->attr)); bond_sysfs_slave_del() 175 kobject_put(&slave->kobj); bond_sysfs_slave_del()
|
/linux-4.4.14/drivers/platform/chrome/ |
H A D | cros_ec_vbc.c | 27 static ssize_t vboot_context_read(struct file *filp, struct kobject *kobj, vboot_context_read() argument 31 struct device *dev = container_of(kobj, struct device, kobj); vboot_context_read() 68 static ssize_t vboot_context_write(struct file *filp, struct kobject *kobj, vboot_context_write() argument 72 struct device *dev = container_of(kobj, struct device, kobj); vboot_context_write() 110 static umode_t cros_ec_vbc_is_visible(struct kobject *kobj, cros_ec_vbc_is_visible() argument 113 struct device *dev = container_of(kobj, struct device, kobj); cros_ec_vbc_is_visible()
|
/linux-4.4.14/fs/btrfs/ |
H A D | sysfs.c | 35 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj); 36 static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj); 93 static ssize_t btrfs_feature_attr_show(struct kobject *kobj, btrfs_feature_attr_show() argument 97 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_feature_attr_show() 109 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, btrfs_feature_attr_store() argument 119 fs_info = to_fs_info(kobj); btrfs_feature_attr_store() 174 static umode_t btrfs_feature_visible(struct kobject *kobj, btrfs_feature_visible() argument 177 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_feature_visible() 236 static ssize_t global_rsv_size_show(struct kobject *kobj, global_rsv_size_show() argument 239 struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent); global_rsv_size_show() 245 static ssize_t global_rsv_reserved_show(struct kobject *kobj, global_rsv_reserved_show() argument 248 struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent); global_rsv_reserved_show() 254 #define to_space_info(_kobj) container_of(_kobj, struct btrfs_space_info, kobj) 255 #define to_raid_kobj(_kobj) container_of(_kobj, struct raid_kobject, kobj) 257 static ssize_t raid_bytes_show(struct kobject *kobj, 262 static ssize_t raid_bytes_show(struct kobject *kobj, raid_bytes_show() argument 266 struct btrfs_space_info *sinfo = to_space_info(kobj->parent); raid_bytes_show() 268 int index = to_raid_kobj(kobj)->raid_type; raid_bytes_show() 288 static void release_raid_kobj(struct kobject *kobj) release_raid_kobj() argument 290 kfree(to_raid_kobj(kobj)); release_raid_kobj() 300 static ssize_t btrfs_space_info_show_##field(struct kobject *kobj, \ 304 struct btrfs_space_info *sinfo = to_space_info(kobj); \ 309 static ssize_t btrfs_space_info_show_total_bytes_pinned(struct kobject *kobj, btrfs_space_info_show_total_bytes_pinned() argument 313 struct btrfs_space_info *sinfo = to_space_info(kobj); btrfs_space_info_show_total_bytes_pinned() 341 static void space_info_release(struct kobject *kobj) space_info_release() argument 343 struct btrfs_space_info *sinfo = to_space_info(kobj); space_info_release() 360 static ssize_t btrfs_label_show(struct kobject *kobj, btrfs_label_show() argument 363 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_label_show() 368 static ssize_t btrfs_label_store(struct kobject *kobj, btrfs_label_store() argument 372 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_label_store() 402 static ssize_t btrfs_nodesize_show(struct kobject *kobj, btrfs_nodesize_show() argument 405 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_nodesize_show() 412 static ssize_t btrfs_sectorsize_show(struct kobject *kobj, btrfs_sectorsize_show() argument 415 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_sectorsize_show() 422 static ssize_t btrfs_clone_alignment_show(struct kobject *kobj, btrfs_clone_alignment_show() argument 425 struct btrfs_fs_info *fs_info = to_fs_info(kobj); btrfs_clone_alignment_show() 440 static void btrfs_release_fsid_kobj(struct kobject *kobj) btrfs_release_fsid_kobj() argument 442 struct btrfs_fs_devices *fs_devs = to_fs_devs(kobj); btrfs_release_fsid_kobj() 453 static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj) to_fs_devs() argument 455 if (kobj->ktype != &btrfs_ktype) to_fs_devs() 457 return container_of(kobj, struct btrfs_fs_devices, fsid_kobj); to_fs_devs() 460 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj) to_fs_info() argument 462 if (kobj->ktype != &btrfs_ktype) to_fs_info() 464 return to_fs_devs(kobj)->fs_info; to_fs_info() 651 disk_kobj = &part_to_dev(disk)->kobj; btrfs_sysfs_rm_device_link() 665 disk_kobj = &part_to_dev(disk)->kobj; btrfs_sysfs_rm_device_link() 703 disk_kobj = &part_to_dev(disk)->kobj; btrfs_sysfs_add_device_link() 809 ret = sysfs_create_group(&btrfs_kset->kobj, &btrfs_feature_attr_group); btrfs_init_sysfs() 824 sysfs_remove_group(&btrfs_kset->kobj, &btrfs_feature_attr_group); btrfs_exit_sysfs()
|
/linux-4.4.14/arch/powerpc/platforms/powernv/ |
H A D | opal-elog.c | 25 struct kobject kobj; member in struct:elog_obj 32 #define to_elog_obj(x) container_of(x, struct elog_obj, kobj) 80 sysfs_remove_file_self(&elog_obj->kobj, &attr->attr); elog_ack_store() 81 kobject_put(&elog_obj->kobj); elog_ack_store() 94 static ssize_t elog_attr_show(struct kobject *kobj, elog_attr_show() argument 102 elog = to_elog_obj(kobj); elog_attr_show() 110 static ssize_t elog_attr_store(struct kobject *kobj, elog_attr_store() argument 118 elog = to_elog_obj(kobj); elog_attr_store() 131 static void elog_release(struct kobject *kobj) elog_release() argument 135 elog = to_elog_obj(kobj); elog_release() 156 static ssize_t raw_attr_read(struct file *filep, struct kobject *kobj, raw_attr_read() argument 162 struct elog_obj *elog = to_elog_obj(kobj); raw_attr_read() 195 elog->kobj.kset = elog_kset; create_elog_obj() 197 kobject_init(&elog->kobj, &elog_ktype); create_elog_obj() 223 rc = kobject_add(&elog->kobj, NULL, "0x%llx", id); create_elog_obj() 225 kobject_put(&elog->kobj); create_elog_obj() 229 rc = sysfs_create_bin_file(&elog->kobj, &elog->raw_attr); create_elog_obj() 231 kobject_put(&elog->kobj); create_elog_obj() 235 kobject_uevent(&elog->kobj, KOBJ_ADD); create_elog_obj()
|
H A D | opal-dump.c | 25 struct kobject kobj; member in struct:dump_obj 32 #define to_dump_obj(x) container_of(x, struct dump_obj, kobj) 96 sysfs_remove_file_self(&dump_obj->kobj, &attr->attr); dump_ack_store() 97 kobject_put(&dump_obj->kobj); dump_ack_store() 158 static ssize_t dump_attr_show(struct kobject *kobj, dump_attr_show() argument 166 dump = to_dump_obj(kobj); dump_attr_show() 174 static ssize_t dump_attr_store(struct kobject *kobj, dump_attr_store() argument 182 dump = to_dump_obj(kobj); dump_attr_store() 195 static void dump_release(struct kobject *kobj) dump_release() argument 199 dump = to_dump_obj(kobj); dump_release() 283 static ssize_t dump_attr_read(struct file *filep, struct kobject *kobj, dump_attr_read() argument 289 struct dump_obj *dump = to_dump_obj(kobj); dump_attr_read() 332 dump->kobj.kset = dump_kset; create_dump_obj() 334 kobject_init(&dump->kobj, &dump_ktype); create_dump_obj() 347 rc = kobject_add(&dump->kobj, NULL, "0x%x-0x%x", type, id); create_dump_obj() 349 kobject_put(&dump->kobj); create_dump_obj() 353 rc = sysfs_create_bin_file(&dump->kobj, &dump->dump_attr); create_dump_obj() 355 kobject_put(&dump->kobj); create_dump_obj() 362 kobject_uevent(&dump->kobj, KOBJ_ADD); create_dump_obj() 409 rc = sysfs_create_group(&dump_kset->kobj, &initiate_attr_group); opal_platform_dump_init() 413 kobject_put(&dump_kset->kobj); opal_platform_dump_init()
|
/linux-4.4.14/drivers/hid/ |
H A D | hid-roccat-lua.c | 29 static ssize_t lua_sysfs_read(struct file *fp, struct kobject *kobj, lua_sysfs_read() argument 33 struct device *dev = container_of(kobj, struct device, kobj); lua_sysfs_read() 51 static ssize_t lua_sysfs_write(struct file *fp, struct kobject *kobj, lua_sysfs_write() argument 55 struct device *dev = container_of(kobj, struct device, kobj); lua_sysfs_write() 72 struct kobject *kobj, struct bin_attribute *attr, \ 75 return lua_sysfs_write(fp, kobj, buf, off, count, \ 81 struct kobject *kobj, struct bin_attribute *attr, \ 84 return lua_sysfs_read(fp, kobj, buf, off, count, \ 102 return sysfs_create_bin_file(&intf->dev.kobj, &lua_control_attr); lua_create_sysfs_attributes() 107 sysfs_remove_bin_file(&intf->dev.kobj, &lua_control_attr); lua_remove_sysfs_attributes()
|
H A D | hid-roccat-common.h | 43 ssize_t roccat_common2_sysfs_read(struct file *fp, struct kobject *kobj, 46 ssize_t roccat_common2_sysfs_write(struct file *fp, struct kobject *kobj, 52 struct kobject *kobj, struct bin_attribute *attr, char *buf, \ 55 return roccat_common2_sysfs_write(fp, kobj, buf, off, count, \ 61 struct kobject *kobj, struct bin_attribute *attr, char *buf, \ 64 return roccat_common2_sysfs_read(fp, kobj, buf, off, count, \
|
H A D | hid-roccat-common.c | 133 ssize_t roccat_common2_sysfs_read(struct file *fp, struct kobject *kobj, roccat_common2_sysfs_read() argument 138 container_of(kobj, struct device, kobj)->parent->parent; roccat_common2_sysfs_read() 157 ssize_t roccat_common2_sysfs_write(struct file *fp, struct kobject *kobj, roccat_common2_sysfs_write() argument 162 container_of(kobj, struct device, kobj)->parent->parent; roccat_common2_sysfs_write()
|
H A D | hid-roccat-pyra.c | 89 static ssize_t pyra_sysfs_read(struct file *fp, struct kobject *kobj, pyra_sysfs_read() argument 94 container_of(kobj, struct device, kobj)->parent->parent; pyra_sysfs_read() 115 static ssize_t pyra_sysfs_write(struct file *fp, struct kobject *kobj, pyra_sysfs_write() argument 120 container_of(kobj, struct device, kobj)->parent->parent; pyra_sysfs_write() 140 struct kobject *kobj, struct bin_attribute *attr, char *buf, \ 143 return pyra_sysfs_write(fp, kobj, buf, off, count, \ 149 struct kobject *kobj, struct bin_attribute *attr, char *buf, \ 152 return pyra_sysfs_read(fp, kobj, buf, off, count, \ 191 struct kobject *kobj, struct bin_attribute *attr, char *buf, pyra_sysfs_read_profilex_settings() 195 container_of(kobj, struct device, kobj)->parent->parent; pyra_sysfs_read_profilex_settings() 204 return pyra_sysfs_read(fp, kobj, buf, off, count, pyra_sysfs_read_profilex_settings() 210 struct kobject *kobj, struct bin_attribute *attr, char *buf, pyra_sysfs_read_profilex_buttons() 214 container_of(kobj, struct device, kobj)->parent->parent; pyra_sysfs_read_profilex_buttons() 223 return pyra_sysfs_read(fp, kobj, buf, off, count, pyra_sysfs_read_profilex_buttons() 248 struct kobject *kobj, struct bin_attribute *attr, char *buf, pyra_sysfs_write_settings() 252 container_of(kobj, struct device, kobj)->parent->parent; pyra_sysfs_write_settings() 190 pyra_sysfs_read_profilex_settings(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) pyra_sysfs_read_profilex_settings() argument 209 pyra_sysfs_read_profilex_buttons(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) pyra_sysfs_read_profilex_buttons() argument 247 pyra_sysfs_write_settings(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) pyra_sysfs_write_settings() argument
|
H A D | hid-roccat-koneplus.c | 86 static ssize_t koneplus_sysfs_read(struct file *fp, struct kobject *kobj, koneplus_sysfs_read() argument 91 container_of(kobj, struct device, kobj)->parent->parent; koneplus_sysfs_read() 112 static ssize_t koneplus_sysfs_write(struct file *fp, struct kobject *kobj, koneplus_sysfs_write() argument 117 container_of(kobj, struct device, kobj)->parent->parent; koneplus_sysfs_write() 138 struct kobject *kobj, struct bin_attribute *attr, char *buf, \ 141 return koneplus_sysfs_write(fp, kobj, buf, off, count, \ 147 struct kobject *kobj, struct bin_attribute *attr, char *buf, \ 150 return koneplus_sysfs_read(fp, kobj, buf, off, count, \ 193 struct kobject *kobj, struct bin_attribute *attr, char *buf, koneplus_sysfs_read_profilex_settings() 197 container_of(kobj, struct device, kobj)->parent->parent; koneplus_sysfs_read_profilex_settings() 206 return koneplus_sysfs_read(fp, kobj, buf, off, count, koneplus_sysfs_read_profilex_settings() 212 struct kobject *kobj, struct bin_attribute *attr, char *buf, koneplus_sysfs_read_profilex_buttons() 216 container_of(kobj, struct device, kobj)->parent->parent; koneplus_sysfs_read_profilex_buttons() 225 return koneplus_sysfs_read(fp, kobj, buf, off, count, koneplus_sysfs_read_profilex_buttons() 192 koneplus_sysfs_read_profilex_settings(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) koneplus_sysfs_read_profilex_settings() argument 211 koneplus_sysfs_read_profilex_buttons(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) koneplus_sysfs_read_profilex_buttons() argument
|
H A D | hid-roccat-kovaplus.c | 127 static ssize_t kovaplus_sysfs_read(struct file *fp, struct kobject *kobj, kovaplus_sysfs_read() argument 132 container_of(kobj, struct device, kobj)->parent->parent; kovaplus_sysfs_read() 153 static ssize_t kovaplus_sysfs_write(struct file *fp, struct kobject *kobj, kovaplus_sysfs_write() argument 158 container_of(kobj, struct device, kobj)->parent->parent; kovaplus_sysfs_write() 179 struct kobject *kobj, struct bin_attribute *attr, char *buf, \ 182 return kovaplus_sysfs_write(fp, kobj, buf, off, count, \ 188 struct kobject *kobj, struct bin_attribute *attr, char *buf, \ 191 return kovaplus_sysfs_read(fp, kobj, buf, off, count, \ 221 struct kobject *kobj, struct bin_attribute *attr, char *buf, kovaplus_sysfs_read_profilex_settings() 225 container_of(kobj, struct device, kobj)->parent->parent; kovaplus_sysfs_read_profilex_settings() 234 return kovaplus_sysfs_read(fp, kobj, buf, off, count, kovaplus_sysfs_read_profilex_settings() 240 struct kobject *kobj, struct bin_attribute *attr, char *buf, kovaplus_sysfs_read_profilex_buttons() 244 container_of(kobj, struct device, kobj)->parent->parent; kovaplus_sysfs_read_profilex_buttons() 253 return kovaplus_sysfs_read(fp, kobj, buf, off, count, kovaplus_sysfs_read_profilex_buttons() 220 kovaplus_sysfs_read_profilex_settings(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) kovaplus_sysfs_read_profilex_settings() argument 239 kovaplus_sysfs_read_profilex_buttons(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) kovaplus_sysfs_read_profilex_buttons() argument
|
H A D | hid-roccat-arvo.c | 191 struct kobject *kobj, void const *buf, arvo_sysfs_write() 195 container_of(kobj, struct device, kobj)->parent->parent; arvo_sysfs_write() 211 struct kobject *kobj, void *buf, loff_t off, arvo_sysfs_read() 215 container_of(kobj, struct device, kobj)->parent->parent; arvo_sysfs_read() 234 struct kobject *kobj, struct bin_attribute *attr, char *buf, arvo_sysfs_write_button() 237 return arvo_sysfs_write(fp, kobj, buf, off, count, arvo_sysfs_write_button() 244 struct kobject *kobj, struct bin_attribute *attr, char *buf, arvo_sysfs_read_info() 247 return arvo_sysfs_read(fp, kobj, buf, off, count, arvo_sysfs_read_info() 190 arvo_sysfs_write(struct file *fp, struct kobject *kobj, void const *buf, loff_t off, size_t count, size_t real_size, uint command) arvo_sysfs_write() argument 210 arvo_sysfs_read(struct file *fp, struct kobject *kobj, void *buf, loff_t off, size_t count, size_t real_size, uint command) arvo_sysfs_read() argument 233 arvo_sysfs_write_button(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) arvo_sysfs_write_button() argument 243 arvo_sysfs_read_info(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) arvo_sysfs_read_info() argument
|
H A D | hid-roccat-isku.c | 120 static ssize_t isku_sysfs_read(struct file *fp, struct kobject *kobj, isku_sysfs_read() argument 125 container_of(kobj, struct device, kobj)->parent->parent; isku_sysfs_read() 143 static ssize_t isku_sysfs_write(struct file *fp, struct kobject *kobj, isku_sysfs_write() argument 148 container_of(kobj, struct device, kobj)->parent->parent; isku_sysfs_write() 165 static ssize_t isku_sysfs_write_ ## thingy(struct file *fp, struct kobject *kobj, \ 169 return isku_sysfs_write(fp, kobj, buf, off, count, \ 174 static ssize_t isku_sysfs_read_ ## thingy(struct file *fp, struct kobject *kobj, \ 178 return isku_sysfs_read(fp, kobj, buf, off, count, \
|
H A D | hid-roccat-kone.c | 269 static ssize_t kone_sysfs_read_settings(struct file *fp, struct kobject *kobj, kone_sysfs_read_settings() argument 273 container_of(kobj, struct device, kobj)->parent->parent; kone_sysfs_read_settings() 294 static ssize_t kone_sysfs_write_settings(struct file *fp, struct kobject *kobj, kone_sysfs_write_settings() argument 298 container_of(kobj, struct device, kobj)->parent->parent; kone_sysfs_write_settings() 333 struct kobject *kobj, struct bin_attribute *attr, kone_sysfs_read_profilex() 336 container_of(kobj, struct device, kobj)->parent->parent; kone_sysfs_read_profilex() 354 struct kobject *kobj, struct bin_attribute *attr, kone_sysfs_write_profilex() 357 container_of(kobj, struct device, kobj)->parent->parent; kone_sysfs_write_profilex() 332 kone_sysfs_read_profilex(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) kone_sysfs_read_profilex() argument 353 kone_sysfs_write_profilex(struct file *fp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t off, size_t count) kone_sysfs_write_profilex() argument
|
/linux-4.4.14/drivers/platform/mips/ |
H A D | cpu_hwmon.c | 106 static int create_sysfs_cputemp_files(struct kobject *kobj) create_sysfs_cputemp_files() argument 110 ret = sysfs_create_files(kobj, hwmon_cputemp1); create_sysfs_cputemp_files() 117 ret = sysfs_create_files(kobj, hwmon_cputemp2); create_sysfs_cputemp_files() 124 sysfs_remove_files(kobj, hwmon_cputemp1); create_sysfs_cputemp_files() 130 static void remove_sysfs_cputemp_files(struct kobject *kobj) remove_sysfs_cputemp_files() argument 132 sysfs_remove_files(&cpu_hwmon_dev->kobj, hwmon_cputemp1); remove_sysfs_cputemp_files() 135 sysfs_remove_files(&cpu_hwmon_dev->kobj, hwmon_cputemp2); remove_sysfs_cputemp_files() 163 ret = sysfs_create_group(&cpu_hwmon_dev->kobj, loongson_hwmon_init() 170 ret = create_sysfs_cputemp_files(&cpu_hwmon_dev->kobj); loongson_hwmon_init() 182 sysfs_remove_group(&cpu_hwmon_dev->kobj, loongson_hwmon_init() 195 remove_sysfs_cputemp_files(&cpu_hwmon_dev->kobj); loongson_hwmon_exit() 196 sysfs_remove_group(&cpu_hwmon_dev->kobj, loongson_hwmon_exit()
|
/linux-4.4.14/block/ |
H A D | blk-mq-sysfs.c | 16 static void blk_mq_sysfs_release(struct kobject *kobj) blk_mq_sysfs_release() argument 32 static ssize_t blk_mq_sysfs_show(struct kobject *kobj, struct attribute *attr, blk_mq_sysfs_show() argument 41 ctx = container_of(kobj, struct blk_mq_ctx, kobj); blk_mq_sysfs_show() 55 static ssize_t blk_mq_sysfs_store(struct kobject *kobj, struct attribute *attr, blk_mq_sysfs_store() argument 64 ctx = container_of(kobj, struct blk_mq_ctx, kobj); blk_mq_sysfs_store() 78 static ssize_t blk_mq_hw_sysfs_show(struct kobject *kobj, blk_mq_hw_sysfs_show() argument 87 hctx = container_of(kobj, struct blk_mq_hw_ctx, kobj); blk_mq_hw_sysfs_show() 101 static ssize_t blk_mq_hw_sysfs_store(struct kobject *kobj, blk_mq_hw_sysfs_store() argument 111 hctx = container_of(kobj, struct blk_mq_hw_ctx, kobj); blk_mq_hw_sysfs_store() 356 kobject_del(&ctx->kobj); blk_mq_unregister_hctx() 358 kobject_del(&hctx->kobj); blk_mq_unregister_hctx() 370 ret = kobject_add(&hctx->kobj, &q->mq_kobj, "%u", hctx->queue_num); blk_mq_register_hctx() 375 ret = kobject_add(&ctx->kobj, &hctx->kobj, "cpu%u", ctx->cpu); hctx_for_each_ctx() 396 kobject_put(&ctx->kobj); queue_for_each_hw_ctx() 398 kobject_put(&hctx->kobj); queue_for_each_hw_ctx() 405 kobject_put(&disk_to_dev(disk)->kobj); 420 kobject_init(&hctx->kobj, &blk_mq_hw_ktype); blk_mq_sysfs_init() 423 kobject_init(&ctx->kobj, &blk_mq_ctx_ktype); blk_mq_sysfs_init() 437 ret = kobject_add(&q->mq_kobj, kobject_get(&dev->kobj), "%s", "mq"); blk_mq_register_disk()
|
H A D | blk-sysfs.c | 513 queue_attr_show(struct kobject *kobj, struct attribute *attr, char *page) queue_attr_show() argument 517 container_of(kobj, struct request_queue, kobj); queue_attr_show() 533 queue_attr_store(struct kobject *kobj, struct attribute *attr, queue_attr_store() argument 543 q = container_of(kobj, struct request_queue, kobj); queue_attr_store() 563 * @kobj: the kobj belonging to the request queue to be released 576 static void blk_release_queue(struct kobject *kobj) blk_release_queue() argument 579 container_of(kobj, struct request_queue, kobj); blk_release_queue() 649 ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), "%s", "queue"); blk_register_queue() 655 kobject_uevent(&q->kobj, KOBJ_ADD); blk_register_queue() 665 kobject_uevent(&q->kobj, KOBJ_REMOVE); blk_register_queue() 666 kobject_del(&q->kobj); blk_register_queue() 668 kobject_put(&dev->kobj); blk_register_queue() 688 kobject_uevent(&q->kobj, KOBJ_REMOVE); blk_unregister_queue() 689 kobject_del(&q->kobj); blk_unregister_queue() 691 kobject_put(&disk_to_dev(disk)->kobj); blk_unregister_queue()
|
H A D | elevator.c | 163 kobject_init(&eq->kobj, &elv_ktype); elevator_alloc() 171 static void elevator_release(struct kobject *kobj) elevator_release() argument 175 e = container_of(kobj, struct elevator_queue, kobj); elevator_release() 241 kobject_put(&e->kobj); elevator_exit() 748 elv_attr_show(struct kobject *kobj, struct attribute *attr, char *page) elv_attr_show() argument 757 e = container_of(kobj, struct elevator_queue, kobj); elv_attr_show() 765 elv_attr_store(struct kobject *kobj, struct attribute *attr, elv_attr_store() argument 775 e = container_of(kobj, struct elevator_queue, kobj); elv_attr_store() 797 error = kobject_add(&e->kobj, &q->kobj, "%s", "iosched"); elv_register_queue() 802 if (sysfs_create_file(&e->kobj, &attr->attr)) elv_register_queue() 807 kobject_uevent(&e->kobj, KOBJ_ADD); elv_register_queue() 821 kobject_uevent(&e->kobj, KOBJ_REMOVE); elv_unregister_queue() 822 kobject_del(&e->kobj); elv_unregister_queue()
|
H A D | genhd.c | 496 return &disk_to_dev(p)->kobj; exact_match() 526 err = sysfs_create_link(block_depr, &ddev->kobj, register_disk() 527 kobject_name(&ddev->kobj)); register_disk() 541 disk->part0.holder_dir = kobject_create_and_add("holders", &ddev->kobj); register_disk() 542 disk->slave_dir = kobject_create_and_add("slaves", &ddev->kobj); register_disk() 565 kobject_uevent(&ddev->kobj, KOBJ_ADD); register_disk() 570 kobject_uevent(&part_to_dev(part)->kobj, KOBJ_ADD); register_disk() 628 retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj, add_disk() 658 sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi"); del_gendisk() 688 struct kobject *kobj; get_gendisk() local 690 kobj = kobj_lookup(bdev_map, devt, partno); get_gendisk() 691 if (kobj) get_gendisk() 692 disk = dev_to_disk(kobj_to_dev(kobj)); get_gendisk() 1158 if (&disk_to_dev(gp)->kobj.entry == block_class.devices.next) diskstats_show() 1308 struct kobject *kobj; get_disk() local 1315 kobj = kobject_get(&disk_to_dev(disk)->kobj); get_disk() 1316 if (kobj == NULL) { get_disk() 1320 return kobj; get_disk() 1329 kobject_put(&disk_to_dev(disk)->kobj); put_disk() 1341 kobject_uevent_env(&disk_to_dev(gd)->kobj, KOBJ_CHANGE, envp); set_disk_ro_uevent() 1661 kobject_uevent_env(&disk_to_dev(disk)->kobj, KOBJ_CHANGE, envp); disk_check_events() 1817 if (sysfs_create_files(&disk_to_dev(disk)->kobj, disk_events_attrs) < 0) disk_add_events() 1843 sysfs_remove_files(&disk_to_dev(disk)->kobj, disk_events_attrs); disk_del_events()
|
/linux-4.4.14/drivers/iommu/ |
H A D | iommu-sysfs.c | 77 ret = kobject_set_name_vargs(&dev->kobj, fmt, vargs); iommu_device_create() 114 ret = sysfs_add_link_to_group(&dev->kobj, "devices", iommu_device_link() 115 &link->kobj, dev_name(link)); iommu_device_link() 119 ret = sysfs_create_link_nowarn(&link->kobj, &dev->kobj, "iommu"); iommu_device_link() 121 sysfs_remove_link_from_group(&dev->kobj, "devices", iommu_device_link() 132 sysfs_remove_link(&link->kobj, "iommu"); iommu_device_unlink() 133 sysfs_remove_link_from_group(&dev->kobj, "devices", dev_name(link)); iommu_device_unlink()
|
H A D | iommu.c | 45 struct kobject kobj; member in struct:iommu_group 78 container_of(_kobj, struct iommu_group, kobj) 89 static ssize_t iommu_group_attr_show(struct kobject *kobj, iommu_group_attr_show() argument 93 struct iommu_group *group = to_iommu_group(kobj); iommu_group_attr_show() 101 static ssize_t iommu_group_attr_store(struct kobject *kobj, iommu_group_attr_store() argument 106 struct iommu_group *group = to_iommu_group(kobj); iommu_group_attr_store() 122 return sysfs_create_file(&group->kobj, &attr->attr); iommu_group_create_file() 128 sysfs_remove_file(&group->kobj, &attr->attr); iommu_group_remove_file() 138 static void iommu_group_release(struct kobject *kobj) iommu_group_release() argument 140 struct iommu_group *group = to_iommu_group(kobj); iommu_group_release() 184 group->kobj.kset = iommu_group_kset; iommu_group_alloc() 203 ret = kobject_init_and_add(&group->kobj, &iommu_group_ktype, iommu_group_alloc() 213 group->devices_kobj = kobject_create_and_add("devices", &group->kobj); iommu_group_alloc() 215 kobject_put(&group->kobj); /* triggers .release & free */ iommu_group_alloc() 224 kobject_put(&group->kobj); iommu_group_alloc() 251 group = container_of(group_kobj, struct iommu_group, kobj); iommu_group_get_by_id() 255 kobject_put(&group->kobj); iommu_group_get_by_id() 393 ret = sysfs_create_link(&dev->kobj, &group->kobj, "iommu_group"); iommu_group_add_device() 399 device->name = kasprintf(GFP_KERNEL, "%s", kobject_name(&dev->kobj)); iommu_group_add_device() 402 sysfs_remove_link(&dev->kobj, "iommu_group"); iommu_group_add_device() 408 &dev->kobj, device->name); iommu_group_add_device() 417 kobject_name(&dev->kobj), i++); iommu_group_add_device() 421 sysfs_remove_link(&dev->kobj, "iommu_group"); iommu_group_add_device() 482 sysfs_remove_link(&dev->kobj, "iommu_group"); iommu_group_remove_device()
|
/linux-4.4.14/drivers/dma/ioat/ |
H A D | sysfs.c | 54 ioat_attr_show(struct kobject *kobj, struct attribute *attr, char *page) ioat_attr_show() argument 60 ioat_chan = container_of(kobj, struct ioatdma_chan, kobj); ioat_attr_show() 78 struct kobject *parent = &c->dev->device.kobj; ioat_kobject_add() 81 err = kobject_init_and_add(&ioat_chan->kobj, type, ioat_kobject_add() 86 kobject_put(&ioat_chan->kobj); ioat_kobject_add() 101 kobject_del(&ioat_chan->kobj); ioat_kobject_del() 102 kobject_put(&ioat_chan->kobj); ioat_kobject_del()
|
/linux-4.4.14/drivers/staging/lustre/lustre/llite/ |
H A D | lproc_llite.c | 51 static ssize_t blocksize_show(struct kobject *kobj, struct attribute *attr, blocksize_show() argument 54 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, blocksize_show() 69 static ssize_t kbytestotal_show(struct kobject *kobj, struct attribute *attr, kbytestotal_show() argument 72 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, kbytestotal_show() 94 static ssize_t kbytesfree_show(struct kobject *kobj, struct attribute *attr, kbytesfree_show() argument 97 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, kbytesfree_show() 119 static ssize_t kbytesavail_show(struct kobject *kobj, struct attribute *attr, kbytesavail_show() argument 122 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, kbytesavail_show() 144 static ssize_t filestotal_show(struct kobject *kobj, struct attribute *attr, filestotal_show() argument 147 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, filestotal_show() 162 static ssize_t filesfree_show(struct kobject *kobj, struct attribute *attr, filesfree_show() argument 165 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, filesfree_show() 180 static ssize_t client_type_show(struct kobject *kobj, struct attribute *attr, client_type_show() argument 183 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, client_type_show() 191 static ssize_t fstype_show(struct kobject *kobj, struct attribute *attr, fstype_show() argument 194 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, fstype_show() 201 static ssize_t uuid_show(struct kobject *kobj, struct attribute *attr, uuid_show() argument 204 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, uuid_show() 224 static ssize_t max_read_ahead_mb_show(struct kobject *kobj, max_read_ahead_mb_show() argument 227 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, max_read_ahead_mb_show() 240 static ssize_t max_read_ahead_mb_store(struct kobject *kobj, max_read_ahead_mb_store() argument 245 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, max_read_ahead_mb_store() 271 static ssize_t max_read_ahead_per_file_mb_show(struct kobject *kobj, max_read_ahead_per_file_mb_show() argument 275 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, max_read_ahead_per_file_mb_show() 288 static ssize_t max_read_ahead_per_file_mb_store(struct kobject *kobj, max_read_ahead_per_file_mb_store() argument 293 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, max_read_ahead_per_file_mb_store() 316 static ssize_t max_read_ahead_whole_mb_show(struct kobject *kobj, max_read_ahead_whole_mb_show() argument 320 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, max_read_ahead_whole_mb_show() 333 static ssize_t max_read_ahead_whole_mb_store(struct kobject *kobj, max_read_ahead_whole_mb_store() argument 338 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, max_read_ahead_whole_mb_store() 485 static ssize_t checksum_pages_show(struct kobject *kobj, struct attribute *attr, checksum_pages_show() argument 488 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, checksum_pages_show() 494 static ssize_t checksum_pages_store(struct kobject *kobj, checksum_pages_store() argument 499 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, checksum_pages_store() 525 static ssize_t ll_rd_track_id(struct kobject *kobj, char *buf, ll_rd_track_id() argument 528 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, ll_rd_track_id() 539 static ssize_t ll_wr_track_id(struct kobject *kobj, const char *buffer, ll_wr_track_id() argument 543 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, ll_wr_track_id() 560 static ssize_t stats_track_pid_show(struct kobject *kobj, stats_track_pid_show() argument 564 return ll_rd_track_id(kobj, buf, STATS_TRACK_PID); stats_track_pid_show() 567 static ssize_t stats_track_pid_store(struct kobject *kobj, stats_track_pid_store() argument 572 return ll_wr_track_id(kobj, buffer, count, STATS_TRACK_PID); stats_track_pid_store() 576 static ssize_t stats_track_ppid_show(struct kobject *kobj, stats_track_ppid_show() argument 580 return ll_rd_track_id(kobj, buf, STATS_TRACK_PPID); stats_track_ppid_show() 583 static ssize_t stats_track_ppid_store(struct kobject *kobj, stats_track_ppid_store() argument 588 return ll_wr_track_id(kobj, buffer, count, STATS_TRACK_PPID); stats_track_ppid_store() 592 static ssize_t stats_track_gid_show(struct kobject *kobj, stats_track_gid_show() argument 596 return ll_rd_track_id(kobj, buf, STATS_TRACK_GID); stats_track_gid_show() 599 static ssize_t stats_track_gid_store(struct kobject *kobj, stats_track_gid_store() argument 604 return ll_wr_track_id(kobj, buffer, count, STATS_TRACK_GID); stats_track_gid_store() 608 static ssize_t statahead_max_show(struct kobject *kobj, statahead_max_show() argument 612 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, statahead_max_show() 618 static ssize_t statahead_max_store(struct kobject *kobj, statahead_max_store() argument 623 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, statahead_max_store() 642 static ssize_t statahead_agl_show(struct kobject *kobj, statahead_agl_show() argument 646 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, statahead_agl_show() 652 static ssize_t statahead_agl_store(struct kobject *kobj, statahead_agl_store() argument 657 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, statahead_agl_store() 692 static ssize_t lazystatfs_show(struct kobject *kobj, lazystatfs_show() argument 696 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, lazystatfs_show() 702 static ssize_t lazystatfs_store(struct kobject *kobj, lazystatfs_store() argument 707 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, lazystatfs_store() 725 static ssize_t max_easize_show(struct kobject *kobj, max_easize_show() argument 729 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, max_easize_show() 742 static ssize_t default_easize_show(struct kobject *kobj, default_easize_show() argument 746 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, default_easize_show() 784 static ssize_t xattr_cache_show(struct kobject *kobj, xattr_cache_show() argument 788 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, xattr_cache_show() 794 static ssize_t xattr_cache_store(struct kobject *kobj, xattr_cache_store() argument 799 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, xattr_cache_store() 858 static void llite_sb_release(struct kobject *kobj) llite_sb_release() argument 860 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, llite_sb_release()
|
/linux-4.4.14/drivers/staging/lustre/lustre/osc/ |
H A D | lproc_osc.c | 45 static ssize_t active_show(struct kobject *kobj, struct attribute *attr, active_show() argument 48 struct obd_device *dev = container_of(kobj, struct obd_device, active_show() 54 static ssize_t active_store(struct kobject *kobj, struct attribute *attr, active_store() argument 58 struct obd_device *dev = container_of(kobj, struct obd_device, active_store() 80 static ssize_t max_rpcs_in_flight_show(struct kobject *kobj, max_rpcs_in_flight_show() argument 84 struct obd_device *dev = container_of(kobj, struct obd_device, max_rpcs_in_flight_show() 91 static ssize_t max_rpcs_in_flight_store(struct kobject *kobj, max_rpcs_in_flight_store() argument 96 struct obd_device *dev = container_of(kobj, struct obd_device, max_rpcs_in_flight_store() 132 static ssize_t max_dirty_mb_show(struct kobject *kobj, max_dirty_mb_show() argument 136 struct obd_device *dev = container_of(kobj, struct obd_device, max_dirty_mb_show() 150 static ssize_t max_dirty_mb_store(struct kobject *kobj, max_dirty_mb_store() argument 155 struct obd_device *dev = container_of(kobj, struct obd_device, max_dirty_mb_store() 233 static ssize_t cur_dirty_bytes_show(struct kobject *kobj, cur_dirty_bytes_show() argument 237 struct obd_device *dev = container_of(kobj, struct obd_device, cur_dirty_bytes_show() 250 static ssize_t cur_grant_bytes_show(struct kobject *kobj, cur_grant_bytes_show() argument 254 struct obd_device *dev = container_of(kobj, struct obd_device, cur_grant_bytes_show() 266 static ssize_t cur_grant_bytes_store(struct kobject *kobj, cur_grant_bytes_store() argument 271 struct obd_device *obd = container_of(kobj, struct obd_device, cur_grant_bytes_store() 297 static ssize_t cur_lost_grant_bytes_show(struct kobject *kobj, cur_lost_grant_bytes_show() argument 301 struct obd_device *dev = container_of(kobj, struct obd_device, cur_lost_grant_bytes_show() 314 static ssize_t grant_shrink_interval_show(struct kobject *kobj, grant_shrink_interval_show() argument 318 struct obd_device *obd = container_of(kobj, struct obd_device, grant_shrink_interval_show() 324 static ssize_t grant_shrink_interval_store(struct kobject *kobj, grant_shrink_interval_store() argument 329 struct obd_device *obd = container_of(kobj, struct obd_device, grant_shrink_interval_store() 347 static ssize_t checksums_show(struct kobject *kobj, checksums_show() argument 351 struct obd_device *obd = container_of(kobj, struct obd_device, checksums_show() 357 static ssize_t checksums_store(struct kobject *kobj, checksums_store() argument 362 struct obd_device *obd = container_of(kobj, struct obd_device, checksums_store() 434 static ssize_t resend_count_show(struct kobject *kobj, resend_count_show() argument 438 struct obd_device *obd = container_of(kobj, struct obd_device, resend_count_show() 444 static ssize_t resend_count_store(struct kobject *kobj, resend_count_store() argument 449 struct obd_device *obd = container_of(kobj, struct obd_device, resend_count_store() 464 static ssize_t contention_seconds_show(struct kobject *kobj, contention_seconds_show() argument 468 struct obd_device *obd = container_of(kobj, struct obd_device, contention_seconds_show() 475 static ssize_t contention_seconds_store(struct kobject *kobj, contention_seconds_store() argument 480 struct obd_device *obd = container_of(kobj, struct obd_device, contention_seconds_store() 489 static ssize_t lockless_truncate_show(struct kobject *kobj, lockless_truncate_show() argument 493 struct obd_device *obd = container_of(kobj, struct obd_device, lockless_truncate_show() 500 static ssize_t lockless_truncate_store(struct kobject *kobj, lockless_truncate_store() argument 505 struct obd_device *obd = container_of(kobj, struct obd_device, lockless_truncate_store() 514 static ssize_t destroys_in_flight_show(struct kobject *kobj, destroys_in_flight_show() argument 518 struct obd_device *obd = container_of(kobj, struct obd_device, destroys_in_flight_show() 526 static ssize_t max_pages_per_rpc_show(struct kobject *kobj, max_pages_per_rpc_show() argument 530 struct obd_device *dev = container_of(kobj, struct obd_device, max_pages_per_rpc_show() 537 static ssize_t max_pages_per_rpc_store(struct kobject *kobj, max_pages_per_rpc_store() argument 542 struct obd_device *dev = container_of(kobj, struct obd_device, max_pages_per_rpc_store()
|
/linux-4.4.14/arch/x86/kernel/ |
H A D | ksysfs.c | 23 static ssize_t version_show(struct kobject *kobj, version_show() argument 31 static ssize_t boot_params_data_read(struct file *fp, struct kobject *kobj, boot_params_data_read() argument 63 static int kobj_to_setup_data_nr(struct kobject *kobj, int *nr) kobj_to_setup_data_nr() argument 67 name = kobject_name(kobj); kobj_to_setup_data_nr() 116 static ssize_t type_show(struct kobject *kobj, type_show() argument 123 ret = kobj_to_setup_data_nr(kobj, &nr); type_show() 140 struct kobject *kobj, setup_data_data_read() 150 ret = kobj_to_setup_data_nr(kobj, &nr); setup_data_data_read() 215 struct kobject *kobj; create_setup_data_node() local 219 kobj = kobject_create_and_add(name, parent); create_setup_data_node() 220 if (!kobj) create_setup_data_node() 228 ret = sysfs_create_group(kobj, &setup_data_attr_group); create_setup_data_node() 231 *kobjp = kobj; create_setup_data_node() 235 kobject_put(kobj); create_setup_data_node() 239 static void __init cleanup_setup_data_node(struct kobject *kobj) cleanup_setup_data_node() argument 241 sysfs_remove_group(kobj, &setup_data_attr_group); cleanup_setup_data_node() 242 kobject_put(kobj); cleanup_setup_data_node() 139 setup_data_data_read(struct file *fp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) setup_data_data_read() argument
|
/linux-4.4.14/drivers/pci/ |
H A D | slot.c | 19 static ssize_t pci_slot_attr_show(struct kobject *kobj, pci_slot_attr_show() argument 22 struct pci_slot *slot = to_pci_slot(kobj); pci_slot_attr_show() 27 static ssize_t pci_slot_attr_store(struct kobject *kobj, pci_slot_attr_store() argument 30 struct pci_slot *slot = to_pci_slot(kobj); pci_slot_attr_store() 102 static void pci_slot_release(struct kobject *kobj) pci_slot_release() argument 105 struct pci_slot *slot = to_pci_slot(kobj); pci_slot_release() 191 result = kobject_rename(&slot->kobj, slot_name); rename_slot() 215 kobject_get(&slot->kobj); get_slot() 283 kobject_put(&slot->kobj); pci_create_slot() 301 slot->kobj.kset = pci_slots_kset; pci_create_slot() 309 err = kobject_init_and_add(&slot->kobj, &pci_slot_ktype, NULL, pci_create_slot() 342 * just call kobject_put on its kobj and let our release methods do the 348 slot->number, atomic_read(&slot->kobj.kref.refcount) - 1); pci_destroy_slot() 351 kobject_put(&slot->kobj); pci_destroy_slot() 368 struct kobject *kobj = NULL; pci_hp_create_module_link() local 373 kobj = kset_find_obj(module_kset, slot->ops->mod_name); pci_hp_create_module_link() 374 if (!kobj) pci_hp_create_module_link() 376 ret = sysfs_create_link(&pci_slot->kobj, kobj, "module"); pci_hp_create_module_link() 380 kobject_put(kobj); pci_hp_create_module_link() 393 sysfs_remove_link(&pci_slot->kobj, "module"); pci_hp_remove_module_link() 404 &pci_bus_kset->kobj); pci_slot_init()
|
H A D | pci-sysfs.c | 629 static ssize_t pci_read_config(struct file *filp, struct kobject *kobj, pci_read_config() argument 633 struct pci_dev *dev = to_pci_dev(container_of(kobj, struct device, pci_read_config() 634 kobj)); pci_read_config() 706 static ssize_t pci_write_config(struct file *filp, struct kobject *kobj, pci_write_config() argument 710 struct pci_dev *dev = to_pci_dev(container_of(kobj, struct device, pci_write_config() 711 kobj)); pci_write_config() 768 static ssize_t read_vpd_attr(struct file *filp, struct kobject *kobj, read_vpd_attr() argument 773 to_pci_dev(container_of(kobj, struct device, kobj)); read_vpd_attr() 783 static ssize_t write_vpd_attr(struct file *filp, struct kobject *kobj, write_vpd_attr() argument 788 to_pci_dev(container_of(kobj, struct device, kobj)); write_vpd_attr() 802 * @kobj: kobject corresponding to file to read from 811 static ssize_t pci_read_legacy_io(struct file *filp, struct kobject *kobj, pci_read_legacy_io() argument 815 struct pci_bus *bus = to_pci_bus(container_of(kobj, struct device, pci_read_legacy_io() 816 kobj)); pci_read_legacy_io() 828 * @kobj: kobject corresponding to file to read from 837 static ssize_t pci_write_legacy_io(struct file *filp, struct kobject *kobj, pci_write_legacy_io() argument 841 struct pci_bus *bus = to_pci_bus(container_of(kobj, struct device, pci_write_legacy_io() 842 kobj)); pci_write_legacy_io() 854 * @kobj: kobject corresponding to device to be mapped 862 static int pci_mmap_legacy_mem(struct file *filp, struct kobject *kobj, pci_mmap_legacy_mem() argument 866 struct pci_bus *bus = to_pci_bus(container_of(kobj, struct device, pci_mmap_legacy_mem() 867 kobj)); pci_mmap_legacy_mem() 875 * @kobj: kobject corresponding to device to be mapped 883 static int pci_mmap_legacy_io(struct file *filp, struct kobject *kobj, pci_mmap_legacy_io() argument 887 struct pci_bus *bus = to_pci_bus(container_of(kobj, struct device, pci_mmap_legacy_io() 888 kobj)); pci_mmap_legacy_io() 993 * @kobj: kobject for mapping 1000 static int pci_mmap_resource(struct kobject *kobj, struct bin_attribute *attr, pci_mmap_resource() argument 1003 struct pci_dev *pdev = to_pci_dev(container_of(kobj, pci_mmap_resource() 1004 struct device, kobj)); pci_mmap_resource() 1039 static int pci_mmap_resource_uc(struct file *filp, struct kobject *kobj, pci_mmap_resource_uc() argument 1043 return pci_mmap_resource(kobj, attr, vma, 0); pci_mmap_resource_uc() 1046 static int pci_mmap_resource_wc(struct file *filp, struct kobject *kobj, pci_mmap_resource_wc() argument 1050 return pci_mmap_resource(kobj, attr, vma, 1); pci_mmap_resource_wc() 1053 static ssize_t pci_resource_io(struct file *filp, struct kobject *kobj, pci_resource_io() argument 1057 struct pci_dev *pdev = to_pci_dev(container_of(kobj, pci_resource_io() 1058 struct device, kobj)); pci_resource_io() 1100 static ssize_t pci_read_resource_io(struct file *filp, struct kobject *kobj, pci_read_resource_io() argument 1104 return pci_resource_io(filp, kobj, attr, buf, off, count, false); pci_read_resource_io() 1107 static ssize_t pci_write_resource_io(struct file *filp, struct kobject *kobj, pci_write_resource_io() argument 1111 return pci_resource_io(filp, kobj, attr, buf, off, count, true); pci_write_resource_io() 1130 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); pci_remove_resource_files() 1136 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); pci_remove_resource_files() 1171 retval = sysfs_create_bin_file(&pdev->dev.kobj, res_attr); pci_create_attr() 1216 * @kobj: kernel object handle pci_remove_resource_files() 1224 static ssize_t pci_write_rom(struct file *filp, struct kobject *kobj, pci_write_rom() argument 1228 struct pci_dev *pdev = to_pci_dev(container_of(kobj, struct device, kobj)); pci_write_rom() 1241 * @kobj: kernel object handle 1248 * device corresponding to @kobj. 1250 static ssize_t pci_read_rom(struct file *filp, struct kobject *kobj, pci_read_rom() argument 1254 struct pci_dev *pdev = to_pci_dev(container_of(kobj, struct device, kobj)); pci_read_rom() 1337 retval = sysfs_create_bin_file(&dev->dev.kobj, attr); pci_create_capabilities_sysfs() 1359 sysfs_remove_bin_file(&dev->dev.kobj, dev->vpd->attr); pci_create_capabilities_sysfs() 1376 retval = sysfs_create_bin_file(&pdev->dev.kobj, &pci_config_attr); pci_create_sysfs_dev_files() 1378 retval = sysfs_create_bin_file(&pdev->dev.kobj, &pcie_config_attr); pci_create_sysfs_dev_files() 1404 retval = sysfs_create_bin_file(&pdev->dev.kobj, attr); pci_create_sysfs_dev_files() 1423 sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr); pci_create_sysfs_dev_files() 1431 sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); pci_create_sysfs_dev_files() 1433 sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr); pci_create_sysfs_dev_files() 1441 sysfs_remove_bin_file(&dev->dev.kobj, dev->vpd->attr); pci_remove_capabilities_sysfs() 1468 sysfs_remove_bin_file(&pdev->dev.kobj, &pci_config_attr); pci_remove_sysfs_dev_files() 1470 sysfs_remove_bin_file(&pdev->dev.kobj, &pcie_config_attr); pci_remove_sysfs_dev_files() 1480 sysfs_remove_bin_file(&pdev->dev.kobj, pdev->rom_attr); pci_remove_sysfs_dev_files() 1511 static umode_t pci_dev_attrs_are_visible(struct kobject *kobj, pci_dev_attrs_are_visible() argument 1514 struct device *dev = container_of(kobj, struct device, kobj); pci_dev_attrs_are_visible() 1530 static umode_t pci_dev_hp_attrs_are_visible(struct kobject *kobj, pci_dev_hp_attrs_are_visible() argument 1533 struct device *dev = container_of(kobj, struct device, kobj); pci_dev_hp_attrs_are_visible() 1554 static umode_t sriov_attrs_are_visible(struct kobject *kobj, sriov_attrs_are_visible() argument 1557 struct device *dev = container_of(kobj, struct device, kobj); sriov_attrs_are_visible()
|
H A D | pci-label.c | 74 static umode_t smbios_instance_string_exist(struct kobject *kobj, smbios_instance_string_exist() argument 80 dev = container_of(kobj, struct device, kobj); smbios_instance_string_exist() 130 return sysfs_create_group(&pdev->dev.kobj, &smbios_attr_group); pci_create_smbiosname_file() 135 sysfs_remove_group(&pdev->dev.kobj, &smbios_attr_group); pci_remove_smbiosname_file() 219 static umode_t acpi_index_string_exist(struct kobject *kobj, acpi_index_string_exist() argument 224 dev = container_of(kobj, struct device, kobj); acpi_index_string_exist() 267 return sysfs_create_group(&pdev->dev.kobj, &acpi_attr_group); pci_create_acpi_index_label_files() 272 sysfs_remove_group(&pdev->dev.kobj, &acpi_attr_group); pci_remove_acpi_index_label_files()
|
H A D | host-bridge.c | 31 kobject_get(&bridge->kobj); pci_get_host_bridge_device() 37 kobject_put(&dev->kobj); pci_put_host_bridge_device()
|
H A D | iov.c | 166 rc = sysfs_create_link(&dev->dev.kobj, &virtfn->dev.kobj, buf); virtfn_add() 169 rc = sysfs_create_link(&virtfn->dev.kobj, &dev->dev.kobj, "physfn"); virtfn_add() 173 kobject_uevent(&virtfn->dev.kobj, KOBJ_CHANGE); virtfn_add() 178 sysfs_remove_link(&dev->dev.kobj, buf); virtfn_add() 209 sysfs_remove_link(&dev->dev.kobj, buf); virtfn_remove() 215 if (virtfn->dev.kobj.sd) virtfn_remove() 216 sysfs_remove_link(&virtfn->dev.kobj, "physfn"); virtfn_remove() 299 rc = sysfs_create_link(&dev->dev.kobj, sriov_enable() 300 &pdev->dev.kobj, "dep_link"); sriov_enable() 329 kobject_uevent(&dev->dev.kobj, KOBJ_CHANGE); sriov_enable() 347 sysfs_remove_link(&dev->dev.kobj, "dep_link"); sriov_enable() 373 sysfs_remove_link(&dev->dev.kobj, "dep_link"); sriov_disable()
|
/linux-4.4.14/drivers/uwb/ |
H A D | pal.c | 48 ret = sysfs_create_link(&pal->device->kobj, uwb_pal_register() 49 &rc->uwb_dev.dev.kobj, "uwb_rc"); uwb_pal_register() 53 ret = sysfs_create_link(&rc->uwb_dev.dev.kobj, uwb_pal_register() 54 &pal->device->kobj, pal->name); uwb_pal_register() 56 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); uwb_pal_register() 122 sysfs_remove_link(&rc->uwb_dev.dev.kobj, pal->name); uwb_pal_unregister() 125 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); uwb_pal_unregister()
|
/linux-4.4.14/drivers/gpu/drm/ttm/ |
H A D | ttm_memory.c | 43 struct kobject kobj; member in struct:ttm_mem_zone 74 static void ttm_mem_zone_kobj_release(struct kobject *kobj) ttm_mem_zone_kobj_release() argument 77 container_of(kobj, struct ttm_mem_zone, kobj); ttm_mem_zone_kobj_release() 84 static ssize_t ttm_mem_zone_show(struct kobject *kobj, ttm_mem_zone_show() argument 89 container_of(kobj, struct ttm_mem_zone, kobj); ttm_mem_zone_show() 111 static ssize_t ttm_mem_zone_store(struct kobject *kobj, ttm_mem_zone_store() argument 117 container_of(kobj, struct ttm_mem_zone, kobj); ttm_mem_zone_store() 169 static void ttm_mem_global_kobj_release(struct kobject *kobj) ttm_mem_global_kobj_release() argument 172 container_of(kobj, struct ttm_mem_global, kobj); ttm_mem_global_kobj_release() 267 &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); ttm_mem_init_kernel_zone() 269 kobject_put(&zone->kobj); ttm_mem_init_kernel_zone() 303 &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, "%s", ttm_mem_init_highmem_zone() 306 kobject_put(&zone->kobj); ttm_mem_init_highmem_zone() 351 &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); ttm_mem_init_dma32_zone() 353 kobject_put(&zone->kobj); ttm_mem_init_dma32_zone() 372 &glob->kobj, &ttm_mem_glob_kobj_type, ttm_get_kobj(), "memory_accounting"); ttm_mem_global_init() 374 kobject_put(&glob->kobj); ttm_mem_global_init() 420 kobject_del(&zone->kobj); ttm_mem_global_release() 421 kobject_put(&zone->kobj); ttm_mem_global_release() 423 kobject_del(&glob->kobj); ttm_mem_global_release() 424 kobject_put(&glob->kobj); ttm_mem_global_release()
|
H A D | ttm_module.c | 60 struct kobject *kobj = &ttm_drm_class_device.kobj; ttm_get_kobj() local 61 BUG_ON(kobj == NULL); ttm_get_kobj() 62 return kobj; ttm_get_kobj()
|
H A D | ttm_page_alloc.c | 111 struct kobject kobj; member in struct:ttm_pool_manager 146 static void ttm_pool_kobj_release(struct kobject *kobj) ttm_pool_kobj_release() argument 149 container_of(kobj, struct ttm_pool_manager, kobj); ttm_pool_kobj_release() 153 static ssize_t ttm_pool_store(struct kobject *kobj, ttm_pool_store() argument 157 container_of(kobj, struct ttm_pool_manager, kobj); ttm_pool_store() 187 static ssize_t ttm_pool_show(struct kobject *kobj, ttm_pool_show() argument 191 container_of(kobj, struct ttm_pool_manager, kobj); ttm_pool_show() 836 ret = kobject_init_and_add(&_manager->kobj, &ttm_pool_kobj_type, ttm_page_alloc_init() 837 &glob->kobj, "pool"); ttm_page_alloc_init() 839 kobject_put(&_manager->kobj); ttm_page_alloc_init() 860 kobject_put(&_manager->kobj); ttm_page_alloc_fini()
|
/linux-4.4.14/drivers/staging/most/hdm-dim2/ |
H A D | dim2_sysfs.c | 46 static void bus_kobj_release(struct kobject *kobj) bus_kobj_release() argument 50 static ssize_t bus_kobj_attr_show(struct kobject *kobj, struct attribute *attr, bus_kobj_attr_show() argument 54 container_of(kobj, struct medialb_bus, kobj_group); bus_kobj_attr_show() 63 static ssize_t bus_kobj_attr_store(struct kobject *kobj, struct attribute *attr, bus_kobj_attr_store() argument 68 container_of(kobj, struct medialb_bus, kobj_group); bus_kobj_attr_store()
|
/linux-4.4.14/drivers/pci/hotplug/ |
H A D | rpadlpar_sysfs.c | 32 static ssize_t add_slot_store(struct kobject *kobj, struct kobj_attribute *attr, add_slot_store() argument 56 static ssize_t add_slot_show(struct kobject *kobj, add_slot_show() argument 62 static ssize_t remove_slot_store(struct kobject *kobj, remove_slot_store() argument 87 static ssize_t remove_slot_show(struct kobject *kobj, remove_slot_show() argument 116 &pci_slots_kset->kobj); dlpar_sysfs_init()
|
H A D | pci_hotplug_core.c | 318 retval = sysfs_create_file(&pci_slot->kobj, fs_add_slot() 325 retval = sysfs_create_file(&pci_slot->kobj, fs_add_slot() 332 retval = sysfs_create_file(&pci_slot->kobj, fs_add_slot() 339 retval = sysfs_create_file(&pci_slot->kobj, fs_add_slot() 346 retval = sysfs_create_file(&pci_slot->kobj, fs_add_slot() 356 sysfs_remove_file(&pci_slot->kobj, fs_add_slot() 360 sysfs_remove_file(&pci_slot->kobj, &hotplug_slot_attr_latch.attr); fs_add_slot() 363 sysfs_remove_file(&pci_slot->kobj, fs_add_slot() 367 sysfs_remove_file(&pci_slot->kobj, &hotplug_slot_attr_power.attr); fs_add_slot() 377 sysfs_remove_file(&pci_slot->kobj, &hotplug_slot_attr_power.attr); fs_remove_slot() 380 sysfs_remove_file(&pci_slot->kobj, fs_remove_slot() 384 sysfs_remove_file(&pci_slot->kobj, &hotplug_slot_attr_latch.attr); fs_remove_slot() 387 sysfs_remove_file(&pci_slot->kobj, fs_remove_slot() 391 sysfs_remove_file(&pci_slot->kobj, &hotplug_slot_attr_test.attr); fs_remove_slot() 460 kobject_uevent(&pci_slot->kobj, KOBJ_ADD); __pci_hp_register()
|
/linux-4.4.14/arch/ia64/kernel/ |
H A D | topology.c | 129 struct kobject kobj; member in struct:cache_info 135 struct kobject kobj; member in struct:cpu_cache_info 273 #define to_object(k) container_of(k, struct cache_info, kobj) 276 static ssize_t ia64_cache_show(struct kobject * kobj, struct attribute * attr, char * buf) ia64_cache_show() argument 279 struct cache_info *this_leaf = to_object(kobj); ia64_cache_show() 304 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); cpu_cache_sysfs_exit() 346 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); cpu_cache_sysfs_init() 360 if (all_cpu_cache_info[cpu].kobj.parent) cache_add_dev() 373 retval = kobject_init_and_add(&all_cpu_cache_info[cpu].kobj, cache_add_dev() 374 &cache_ktype_percpu_entry, &sys_dev->kobj, cache_add_dev() 383 retval = kobject_init_and_add(&(this_object->kobj), cache_add_dev() 385 &all_cpu_cache_info[cpu].kobj, cache_add_dev() 389 kobject_put(&(LEAF_KOBJECT_PTR(cpu,j)->kobj)); cache_add_dev() 391 kobject_put(&all_cpu_cache_info[cpu].kobj); cache_add_dev() 395 kobject_uevent(&(this_object->kobj), KOBJ_ADD); cache_add_dev() 397 kobject_uevent(&all_cpu_cache_info[cpu].kobj, KOBJ_ADD); cache_add_dev() 408 kobject_put(&(LEAF_KOBJECT_PTR(cpu,i)->kobj)); cache_remove_dev() 410 if (all_cpu_cache_info[cpu].kobj.parent) { cache_remove_dev() 411 kobject_put(&all_cpu_cache_info[cpu].kobj); cache_remove_dev() 412 memset(&all_cpu_cache_info[cpu].kobj, cache_remove_dev()
|
/linux-4.4.14/fs/ |
H A D | char_dev.c | 260 kobject_set_name(&cdev->kobj, "%s", name); __register_chrdev() 270 kobject_put(&cdev->kobj); __register_chrdev() 325 struct kobject *kobj; cdev_get() local 329 kobj = kobject_get(&p->kobj); cdev_get() 330 if (!kobj) cdev_get() 332 return kobj; cdev_get() 339 kobject_put(&p->kobj); cdev_put() 357 struct kobject *kobj; chrdev_open() local 360 kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx); chrdev_open() 361 if (!kobj) chrdev_open() 363 new = container_of(kobj, struct cdev, kobj); chrdev_open() 433 return &p->kobj; exact_match() 464 kobject_get(p->kobj.parent); cdev_add() 484 kobject_put(&p->kobj); cdev_del() 488 static void cdev_default_release(struct kobject *kobj) cdev_default_release() argument 490 struct cdev *p = container_of(kobj, struct cdev, kobj); cdev_default_release() 491 struct kobject *parent = kobj->parent; cdev_default_release() 497 static void cdev_dynamic_release(struct kobject *kobj) cdev_dynamic_release() argument 499 struct cdev *p = container_of(kobj, struct cdev, kobj); cdev_dynamic_release() 500 struct kobject *parent = kobj->parent; cdev_dynamic_release() 525 kobject_init(&p->kobj, &ktype_cdev_dynamic); cdev_alloc() 542 kobject_init(&cdev->kobj, &ktype_cdev_default); cdev_init()
|
/linux-4.4.14/drivers/misc/cxl/ |
H A D | sysfs.c | 385 static ssize_t afu_eb_read(struct file *filp, struct kobject *kobj, afu_eb_read() argument 389 struct cxl_afu *afu = to_cxl_afu(container_of(kobj, afu_eb_read() 390 struct device, kobj)); afu_eb_read() 430 struct kobject kobj; member in struct:afu_config_record 439 #define to_cr(obj) container_of(obj, struct afu_config_record, kobj) 441 static ssize_t vendor_show(struct kobject *kobj, vendor_show() argument 444 struct afu_config_record *cr = to_cr(kobj); vendor_show() 449 static ssize_t device_show(struct kobject *kobj, device_show() argument 452 struct afu_config_record *cr = to_cr(kobj); device_show() 457 static ssize_t class_show(struct kobject *kobj, class_show() argument 460 struct afu_config_record *cr = to_cr(kobj); class_show() 465 static ssize_t afu_read_config(struct file *filp, struct kobject *kobj, afu_read_config() argument 469 struct afu_config_record *cr = to_cr(kobj); afu_read_config() 470 struct cxl_afu *afu = to_cxl_afu(container_of(kobj->parent, struct device, kobj)); afu_read_config() 497 static void release_afu_config_record(struct kobject *kobj) release_afu_config_record() argument 499 struct afu_config_record *cr = to_cr(kobj); release_afu_config_record() 539 rc = kobject_init_and_add(&cr->kobj, &afu_config_record_type, cxl_sysfs_afu_new_cr() 540 &afu->dev.kobj, "cr%i", cr->cr); cxl_sysfs_afu_new_cr() 544 rc = sysfs_create_bin_file(&cr->kobj, &cr->config_attr); cxl_sysfs_afu_new_cr() 548 rc = kobject_uevent(&cr->kobj, KOBJ_ADD); cxl_sysfs_afu_new_cr() 554 sysfs_remove_bin_file(&cr->kobj, &cr->config_attr); cxl_sysfs_afu_new_cr() 556 kobject_put(&cr->kobj); cxl_sysfs_afu_new_cr() 576 sysfs_remove_bin_file(&cr->kobj, &cr->config_attr); cxl_sysfs_afu_remove() 577 kobject_put(&cr->kobj); cxl_sysfs_afu_remove()
|
/linux-4.4.14/drivers/i2c/ |
H A D | i2c-slave-eeprom.c | 77 static ssize_t i2c_slave_eeprom_bin_read(struct file *filp, struct kobject *kobj, i2c_slave_eeprom_bin_read() argument 83 eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj)); i2c_slave_eeprom_bin_read() 92 static ssize_t i2c_slave_eeprom_bin_write(struct file *filp, struct kobject *kobj, i2c_slave_eeprom_bin_write() argument 98 eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj)); i2c_slave_eeprom_bin_write() 128 ret = sysfs_create_bin_file(&client->dev.kobj, &eeprom->bin); i2c_slave_eeprom_probe() 134 sysfs_remove_bin_file(&client->dev.kobj, &eeprom->bin); i2c_slave_eeprom_probe() 146 sysfs_remove_bin_file(&client->dev.kobj, &eeprom->bin); i2c_slave_eeprom_remove()
|
H A D | i2c-mux.c | 198 WARN(sysfs_create_link(&priv->adap.dev.kobj, &mux_dev->kobj, "mux_device"), i2c_add_mux_adapter() 202 WARN(sysfs_create_link(&mux_dev->kobj, &priv->adap.dev.kobj, symlink_name), i2c_add_mux_adapter() 217 sysfs_remove_link(&priv->mux_dev->kobj, symlink_name); i2c_del_mux_adapter() 219 sysfs_remove_link(&priv->adap.dev.kobj, "mux_device"); i2c_del_mux_adapter()
|
/linux-4.4.14/kernel/power/ |
H A D | main.c | 51 static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr, pm_async_show() argument 57 static ssize_t pm_async_store(struct kobject *kobj, struct kobj_attribute *attr, pm_async_store() argument 86 static ssize_t pm_test_show(struct kobject *kobj, struct kobj_attribute *attr, pm_test_show() argument 107 static ssize_t pm_test_store(struct kobject *kobj, struct kobj_attribute *attr, pm_test_store() argument 247 static ssize_t pm_print_times_show(struct kobject *kobj, pm_print_times_show() argument 253 static ssize_t pm_print_times_store(struct kobject *kobj, pm_print_times_store() argument 276 static ssize_t pm_wakeup_irq_show(struct kobject *kobj, pm_wakeup_irq_show() argument 283 static ssize_t pm_wakeup_irq_store(struct kobject *kobj, pm_wakeup_irq_store() argument 307 static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr, state_show() argument 354 static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr, state_store() argument 413 static ssize_t wakeup_count_show(struct kobject *kobj, wakeup_count_show() argument 423 static ssize_t wakeup_count_store(struct kobject *kobj, wakeup_count_store() argument 455 static ssize_t autosleep_show(struct kobject *kobj, autosleep_show() argument 476 static ssize_t autosleep_store(struct kobject *kobj, autosleep_store() argument 495 static ssize_t wake_lock_show(struct kobject *kobj, wake_lock_show() argument 502 static ssize_t wake_lock_store(struct kobject *kobj, wake_lock_store() argument 512 static ssize_t wake_unlock_show(struct kobject *kobj, wake_unlock_show() argument 519 static ssize_t wake_unlock_store(struct kobject *kobj, wake_unlock_store() argument 535 static ssize_t pm_trace_show(struct kobject *kobj, struct kobj_attribute *attr, pm_trace_show() argument 542 pm_trace_store(struct kobject *kobj, struct kobj_attribute *attr, pm_trace_store() argument 560 static ssize_t pm_trace_dev_match_show(struct kobject *kobj, pm_trace_dev_match_show() argument 568 pm_trace_dev_match_store(struct kobject *kobj, struct kobj_attribute *attr, pm_trace_dev_match_store() argument 579 static ssize_t pm_freeze_timeout_show(struct kobject *kobj, pm_freeze_timeout_show() argument 585 static ssize_t pm_freeze_timeout_store(struct kobject *kobj, pm_freeze_timeout_store() argument
|
/linux-4.4.14/drivers/net/ethernet/qlogic/qlcnic/ |
H A D | qlcnic_sysfs.c | 268 static ssize_t qlcnic_sysfs_read_crb(struct file *filp, struct kobject *kobj, qlcnic_sysfs_read_crb() argument 272 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_read_crb() 285 static ssize_t qlcnic_sysfs_write_crb(struct file *filp, struct kobject *kobj, qlcnic_sysfs_write_crb() argument 289 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_write_crb() 314 static ssize_t qlcnic_sysfs_read_mem(struct file *filp, struct kobject *kobj, qlcnic_sysfs_read_mem() argument 318 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_read_mem() 336 static ssize_t qlcnic_sysfs_write_mem(struct file *filp, struct kobject *kobj, qlcnic_sysfs_write_mem() argument 340 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_write_mem() 400 struct kobject *kobj, qlcnic_sysfs_write_pm_config() 405 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_write_pm_config() 450 struct kobject *kobj, qlcnic_sysfs_read_pm_config() 455 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_read_pm_config() 543 struct kobject *kobj, qlcnic_sysfs_write_esw_config() 548 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_write_esw_config() 627 struct kobject *kobj, qlcnic_sysfs_read_esw_config() 632 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_read_esw_config() 679 struct kobject *kobj, qlcnic_sysfs_write_npar_config() 684 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_write_npar_config() 726 struct kobject *kobj, qlcnic_sysfs_read_npar_config() 731 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_read_npar_config() 773 struct kobject *kobj, qlcnic_sysfs_get_port_stats() 778 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_get_port_stats() 808 struct kobject *kobj, qlcnic_sysfs_get_esw_stats() 813 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_get_esw_stats() 843 struct kobject *kobj, qlcnic_sysfs_clear_esw_stats() 848 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_clear_esw_stats() 872 struct kobject *kobj, qlcnic_sysfs_clear_port_stats() 878 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_clear_port_stats() 902 struct kobject *kobj, qlcnic_sysfs_read_pci_config() 907 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_sysfs_read_pci_config() 942 struct kobject *kobj, qlcnic_83xx_sysfs_flash_read_handler() 949 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_83xx_sysfs_flash_read_handler() 1119 struct kobject *kobj, qlcnic_83xx_sysfs_flash_write_handler() 1127 struct device *dev = container_of(kobj, struct device, kobj); qlcnic_83xx_sysfs_flash_write_handler() 1420 if (sysfs_create_bin_file(&dev->kobj, &bin_attr_flash)) qlcnic_83xx_add_sysfs() 1429 sysfs_remove_bin_file(&dev->kobj, &bin_attr_flash); qlcnic_83xx_remove_sysfs() 399 qlcnic_sysfs_write_pm_config(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_write_pm_config() argument 449 qlcnic_sysfs_read_pm_config(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_read_pm_config() argument 542 qlcnic_sysfs_write_esw_config(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_write_esw_config() argument 626 qlcnic_sysfs_read_esw_config(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_read_esw_config() argument 678 qlcnic_sysfs_write_npar_config(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_write_npar_config() argument 725 qlcnic_sysfs_read_npar_config(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_read_npar_config() argument 772 qlcnic_sysfs_get_port_stats(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_get_port_stats() argument 807 qlcnic_sysfs_get_esw_stats(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_get_esw_stats() argument 842 qlcnic_sysfs_clear_esw_stats(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_clear_esw_stats() argument 871 qlcnic_sysfs_clear_port_stats(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_clear_port_stats() argument 901 qlcnic_sysfs_read_pci_config(struct file *file, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_sysfs_read_pci_config() argument 941 qlcnic_83xx_sysfs_flash_read_handler(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_83xx_sysfs_flash_read_handler() argument 1118 qlcnic_83xx_sysfs_flash_write_handler(struct file *filp, struct kobject *kobj, struct bin_attribute *attr, char *buf, loff_t offset, size_t size) qlcnic_83xx_sysfs_flash_write_handler() argument
|
/linux-4.4.14/drivers/scsi/arcmsr/ |
H A D | arcmsr_attr.c | 64 struct kobject *kobj, arcmsr_sysfs_iop_message_read() 69 struct device *dev = container_of(kobj,struct device,kobj); arcmsr_sysfs_iop_message_read() 111 struct kobject *kobj, arcmsr_sysfs_iop_message_write() 116 struct device *dev = container_of(kobj,struct device,kobj); arcmsr_sysfs_iop_message_write() 159 struct kobject *kobj, arcmsr_sysfs_iop_message_clear() 164 struct device *dev = container_of(kobj,struct device,kobj); arcmsr_sysfs_iop_message_clear() 225 error = sysfs_create_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_read_attr); arcmsr_alloc_sysfs_attr() 230 error = sysfs_create_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_write_attr); arcmsr_alloc_sysfs_attr() 235 error = sysfs_create_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_clear_attr); arcmsr_alloc_sysfs_attr() 242 sysfs_remove_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_write_attr); arcmsr_alloc_sysfs_attr() 244 sysfs_remove_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_read_attr); arcmsr_alloc_sysfs_attr() 253 sysfs_remove_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_clear_attr); arcmsr_free_sysfs_attr() 254 sysfs_remove_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_write_attr); arcmsr_free_sysfs_attr() 255 sysfs_remove_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_read_attr); arcmsr_free_sysfs_attr() 63 arcmsr_sysfs_iop_message_read(struct file *filp, struct kobject *kobj, struct bin_attribute *bin, char *buf, loff_t off, size_t count) arcmsr_sysfs_iop_message_read() argument 110 arcmsr_sysfs_iop_message_write(struct file *filp, struct kobject *kobj, struct bin_attribute *bin, char *buf, loff_t off, size_t count) arcmsr_sysfs_iop_message_write() argument 158 arcmsr_sysfs_iop_message_clear(struct file *filp, struct kobject *kobj, struct bin_attribute *bin, char *buf, loff_t off, size_t count) arcmsr_sysfs_iop_message_clear() argument
|
/linux-4.4.14/drivers/video/fbdev/omap2/dss/ |
H A D | display-sysfs.c | 280 static ssize_t display_attr_show(struct kobject *kobj, struct attribute *attr, display_attr_show() argument 286 dssdev = container_of(kobj, struct omap_dss_device, kobj); display_attr_show() 295 static ssize_t display_attr_store(struct kobject *kobj, struct attribute *attr, display_attr_store() argument 301 dssdev = container_of(kobj, struct omap_dss_device, kobj); display_attr_store() 326 r = kobject_init_and_add(&dssdev->kobj, &display_ktype, for_each_dss_dev() 327 &pdev->dev.kobj, "%s", dssdev->alias); for_each_dss_dev() 348 if (kobject_name(&dssdev->kobj) == NULL) for_each_dss_dev() 351 kobject_del(&dssdev->kobj); for_each_dss_dev() 352 kobject_put(&dssdev->kobj); for_each_dss_dev() 354 memset(&dssdev->kobj, 0, sizeof(dssdev->kobj)); for_each_dss_dev()
|
H A D | overlay-sysfs.c | 405 static ssize_t overlay_attr_show(struct kobject *kobj, struct attribute *attr, overlay_attr_show() argument 411 overlay = container_of(kobj, struct omap_overlay, kobj); overlay_attr_show() 420 static ssize_t overlay_attr_store(struct kobject *kobj, struct attribute *attr, overlay_attr_store() argument 426 overlay = container_of(kobj, struct omap_overlay, kobj); overlay_attr_store() 448 return kobject_init_and_add(&ovl->kobj, &overlay_ktype, dss_overlay_kobj_init() 449 &pdev->dev.kobj, "overlay%d", ovl->id); dss_overlay_kobj_init() 454 kobject_del(&ovl->kobj); dss_overlay_kobj_uninit() 455 kobject_put(&ovl->kobj); dss_overlay_kobj_uninit()
|
H A D | manager-sysfs.c | 478 static ssize_t manager_attr_show(struct kobject *kobj, struct attribute *attr, manager_attr_show() argument 484 manager = container_of(kobj, struct omap_overlay_manager, kobj); manager_attr_show() 493 static ssize_t manager_attr_store(struct kobject *kobj, struct attribute *attr, manager_attr_store() argument 499 manager = container_of(kobj, struct omap_overlay_manager, kobj); manager_attr_store() 521 return kobject_init_and_add(&mgr->kobj, &manager_ktype, dss_manager_kobj_init() 522 &pdev->dev.kobj, "manager%d", mgr->id); dss_manager_kobj_init() 527 kobject_del(&mgr->kobj); dss_manager_kobj_uninit() 528 kobject_put(&mgr->kobj); dss_manager_kobj_uninit() 530 memset(&mgr->kobj, 0, sizeof(mgr->kobj)); dss_manager_kobj_uninit()
|
/linux-4.4.14/samples/kobject/ |
H A D | kset-example.c | 32 struct kobject kobj; member in struct:foo_obj 37 #define to_foo_obj(x) container_of(x, struct foo_obj, kobj) 54 static ssize_t foo_attr_show(struct kobject *kobj, foo_attr_show() argument 62 foo = to_foo_obj(kobj); foo_attr_show() 74 static ssize_t foo_attr_store(struct kobject *kobj, foo_attr_store() argument 82 foo = to_foo_obj(kobj); foo_attr_store() 103 static void foo_release(struct kobject *kobj) foo_release() argument 107 foo = to_foo_obj(kobj); foo_release() 214 foo->kobj.kset = example_kset; create_foo_obj() 222 retval = kobject_init_and_add(&foo->kobj, &foo_ktype, NULL, "%s", name); create_foo_obj() 224 kobject_put(&foo->kobj); create_foo_obj() 232 kobject_uevent(&foo->kobj, KOBJ_ADD); create_foo_obj() 239 kobject_put(&foo->kobj); destroy_foo_obj()
|
H A D | kobject-example.c | 30 static ssize_t foo_show(struct kobject *kobj, struct kobj_attribute *attr, foo_show() argument 36 static ssize_t foo_store(struct kobject *kobj, struct kobj_attribute *attr, foo_store() argument 56 static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr, b_show() argument 68 static ssize_t b_store(struct kobject *kobj, struct kobj_attribute *attr, b_store() argument
|
/linux-4.4.14/drivers/scsi/ |
H A D | iscsi_boot_sysfs.c | 40 static ssize_t iscsi_boot_show_attribute(struct kobject *kobj, iscsi_boot_show_attribute() argument 44 container_of(kobj, struct iscsi_boot_kobj, kobj); iscsi_boot_show_attribute() 62 static void iscsi_boot_kobj_release(struct kobject *kobj) iscsi_boot_kobj_release() argument 65 container_of(kobj, struct iscsi_boot_kobj, kobj); iscsi_boot_kobj_release() 115 static umode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj, iscsi_boot_tgt_attr_is_visible() argument 119 container_of(kobj, struct iscsi_boot_kobj, kobj); iscsi_boot_tgt_attr_is_visible() 196 static umode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj, iscsi_boot_eth_attr_is_visible() argument 200 container_of(kobj, struct iscsi_boot_kobj, kobj); iscsi_boot_eth_attr_is_visible() 268 static umode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj, iscsi_boot_ini_attr_is_visible() argument 272 container_of(kobj, struct iscsi_boot_kobj, kobj); iscsi_boot_ini_attr_is_visible() 319 boot_kobj->kobj.kset = boot_kset->kset; iscsi_boot_create_kobj() 320 if (kobject_init_and_add(&boot_kobj->kobj, &iscsi_boot_ktype, iscsi_boot_create_kobj() 330 if (sysfs_create_group(&boot_kobj->kobj, attr_group)) { iscsi_boot_create_kobj() 334 * the boot kobj was not setup and the normal release iscsi_boot_create_kobj() 338 kobject_put(&boot_kobj->kobj); iscsi_boot_create_kobj() 343 kobject_uevent(&boot_kobj->kobj, KOBJ_ADD); iscsi_boot_create_kobj() 352 sysfs_remove_group(&boot_kobj->kobj, boot_kobj->attr_group); iscsi_boot_remove_kobj() 353 kobject_put(&boot_kobj->kobj); iscsi_boot_remove_kobj()
|
/linux-4.4.14/drivers/staging/lustre/lustre/lmv/ |
H A D | lproc_lmv.c | 45 static ssize_t numobd_show(struct kobject *kobj, struct attribute *attr, numobd_show() argument 48 struct obd_device *dev = container_of(kobj, struct obd_device, numobd_show() 80 static ssize_t placement_show(struct kobject *kobj, struct attribute *attr, placement_show() argument 83 struct obd_device *dev = container_of(kobj, struct obd_device, placement_show() 93 static ssize_t placement_store(struct kobject *kobj, struct attribute *attr, placement_store() argument 97 struct obd_device *dev = container_of(kobj, struct obd_device, placement_store() 124 static ssize_t activeobd_show(struct kobject *kobj, struct attribute *attr, activeobd_show() argument 127 struct obd_device *dev = container_of(kobj, struct obd_device, activeobd_show()
|
/linux-4.4.14/drivers/firmware/ |
H A D | dmi-sysfs.c | 34 struct kobject kobj; member in struct:dmi_sysfs_entry 81 static void dmi_entry_free(struct kobject *kobj) dmi_entry_free() argument 83 kfree(kobj); dmi_entry_free() 86 static struct dmi_sysfs_entry *to_entry(struct kobject *kobj) to_entry() argument 88 return container_of(kobj, struct dmi_sysfs_entry, kobj); to_entry() 96 static ssize_t dmi_sysfs_attr_show(struct kobject *kobj, dmi_sysfs_attr_show() argument 99 struct dmi_sysfs_entry *entry = to_entry(kobj); dmi_sysfs_attr_show() 213 static ssize_t dmi_entry_attr_show(struct kobject *kobj, dmi_entry_attr_show() argument 223 return find_dmi_entry(to_entry(kobj->parent), dmi_entry_attr_show() 428 static ssize_t dmi_sel_raw_read(struct file *filp, struct kobject *kobj, dmi_sel_raw_read() argument 432 struct dmi_sysfs_entry *entry = to_entry(kobj->parent); dmi_sel_raw_read() 456 &entry->kobj, dmi_system_event_log() 534 struct kobject *kobj, dmi_entry_raw_read() 538 struct dmi_sysfs_entry *entry = to_entry(kobj); dmi_entry_raw_read() 553 static void dmi_sysfs_entry_release(struct kobject *kobj) dmi_sysfs_entry_release() argument 555 struct dmi_sysfs_entry *entry = to_entry(kobj); dmi_sysfs_entry_release() 599 entry->kobj.kset = dmi_kset; dmi_sysfs_register_handle() 600 *ret = kobject_init_and_add(&entry->kobj, &dmi_sysfs_entry_ktype, NULL, dmi_sysfs_register_handle() 626 *ret = sysfs_create_bin_file(&entry->kobj, &dmi_entry_raw_attr); dmi_sysfs_register_handle() 633 kobject_put(&entry->kobj); dmi_sysfs_register_handle() 644 kobject_put(&entry->kobj); cleanup_entry_list() 533 dmi_entry_raw_read(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t pos, size_t count) dmi_entry_raw_read() argument
|
H A D | memmap.c | 44 struct kobject kobj; /* kobject for each entry */ member in struct:firmware_map_entry 50 static ssize_t memmap_attr_show(struct kobject *kobj, 101 to_memmap_entry(struct kobject *kobj) to_memmap_entry() argument 103 return container_of(kobj, struct firmware_map_entry, kobj); to_memmap_entry() 106 static void __meminit release_firmware_map_entry(struct kobject *kobj) release_firmware_map_entry() argument 108 struct firmware_map_entry *entry = to_memmap_entry(kobj); release_firmware_map_entry() 160 kobject_init(&entry->kobj, &memmap_ktype); firmware_map_add_entry() 189 if (entry->kobj.state_in_sysfs) add_sysfs_fw_map_entry() 198 entry->kobj.kset = mmap_kset; add_sysfs_fw_map_entry() 199 if (kobject_add(&entry->kobj, NULL, "%d", map_entries_nr++)) add_sysfs_fw_map_entry() 200 kobject_put(&entry->kobj); add_sysfs_fw_map_entry() 210 kobject_put(&entry->kobj); remove_sysfs_fw_map_entry() 399 static ssize_t memmap_attr_show(struct kobject *kobj, memmap_attr_show() argument 402 struct firmware_map_entry *entry = to_memmap_entry(kobj); memmap_attr_show()
|
H A D | edd.c | 60 struct kobject kobj; member in struct:edd_device 111 #define to_edd_device(obj) container_of(obj,struct edd_device,kobj) 114 edd_attr_show(struct kobject * kobj, struct attribute *attr, char *buf) edd_attr_show() argument 116 struct edd_device *dev = to_edd_device(kobj); edd_attr_show() 615 * @kobj: kobject of edd structure 622 static void edd_release(struct kobject * kobj) edd_release() argument 624 struct edd_device * dev = to_edd_device(kobj); edd_release() 688 ret = sysfs_create_link(&edev->kobj,&pci_dev->dev.kobj,"pci_dev"); edd_create_symlink_to_pcidev() 696 kobject_put(&edev->kobj); edd_device_unregister() 708 error = sysfs_create_file(&edev->kobj,&attr->attr); edd_populate_dir() 724 edev->kobj.kset = edd_kset; edd_device_register() 725 error = kobject_init_and_add(&edev->kobj, &edd_ktype, NULL, edd_device_register() 729 kobject_uevent(&edev->kobj, KOBJ_ADD); edd_device_register()
|
/linux-4.4.14/drivers/zorro/ |
H A D | zorro-sysfs.c | 64 static ssize_t zorro_read_config(struct file *filp, struct kobject *kobj, zorro_read_config() argument 68 struct zorro_dev *z = to_zorro_dev(container_of(kobj, struct device, zorro_read_config() 69 kobj)); zorro_read_config() 115 (error = sysfs_create_bin_file(&dev->kobj, &zorro_config_attr))) zorro_create_sysfs_dev_files()
|
/linux-4.4.14/drivers/staging/iio/accel/ |
H A D | adis16220_core.c | 159 static ssize_t adis16220_accel_bin_read(struct file *filp, struct kobject *kobj, adis16220_accel_bin_read() argument 165 struct iio_dev *indio_dev = dev_to_iio_dev(kobj_to_dev(kobj)); adis16220_accel_bin_read() 181 static ssize_t adis16220_adc1_bin_read(struct file *filp, struct kobject *kobj, adis16220_adc1_bin_read() argument 186 struct iio_dev *indio_dev = dev_to_iio_dev(kobj_to_dev(kobj)); adis16220_adc1_bin_read() 202 static ssize_t adis16220_adc2_bin_read(struct file *filp, struct kobject *kobj, adis16220_adc2_bin_read() argument 207 struct iio_dev *indio_dev = dev_to_iio_dev(kobj_to_dev(kobj)); adis16220_adc2_bin_read() 441 ret = sysfs_create_bin_file(&indio_dev->dev.kobj, &accel_bin); adis16220_probe() 445 ret = sysfs_create_bin_file(&indio_dev->dev.kobj, &adc1_bin); adis16220_probe() 449 ret = sysfs_create_bin_file(&indio_dev->dev.kobj, &adc2_bin); adis16220_probe() 463 sysfs_remove_bin_file(&indio_dev->dev.kobj, &adc2_bin); adis16220_probe() 465 sysfs_remove_bin_file(&indio_dev->dev.kobj, &adc1_bin); adis16220_probe() 467 sysfs_remove_bin_file(&indio_dev->dev.kobj, &accel_bin); adis16220_probe() 475 sysfs_remove_bin_file(&indio_dev->dev.kobj, &adc2_bin); adis16220_remove() 476 sysfs_remove_bin_file(&indio_dev->dev.kobj, &adc1_bin); adis16220_remove() 477 sysfs_remove_bin_file(&indio_dev->dev.kobj, &accel_bin); adis16220_remove()
|
/linux-4.4.14/arch/alpha/kernel/ |
H A D | pci-sysfs.c | 56 * @kobj: kobject for mapping 63 static int pci_mmap_resource(struct kobject *kobj, pci_mmap_resource() argument 67 struct pci_dev *pdev = to_pci_dev(container_of(kobj, pci_mmap_resource() 68 struct device, kobj)); pci_mmap_resource() 93 static int pci_mmap_resource_sparse(struct file *filp, struct kobject *kobj, pci_mmap_resource_sparse() argument 97 return pci_mmap_resource(kobj, attr, vma, 1); pci_mmap_resource_sparse() 100 static int pci_mmap_resource_dense(struct file *filp, struct kobject *kobj, pci_mmap_resource_dense() argument 104 return pci_mmap_resource(kobj, attr, vma, 0); pci_mmap_resource_dense() 123 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); pci_remove_resource_files() 129 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); pci_remove_resource_files() 167 return sysfs_create_bin_file(&pdev->dev.kobj, res_attr); pci_create_one_attr()
|
/linux-4.4.14/drivers/staging/most/mostcore/ |
H A D | core.c | 48 struct kobject kobj; member in struct:most_c_obj 73 #define to_c_obj(d) container_of(d, struct most_c_obj, kobj) 81 struct kobject kobj; member in struct:most_inst_obj 85 #define to_inst_obj(d) container_of(d, struct most_inst_obj, kobj) 129 * @kobj: pointer to its kobject 133 static ssize_t channel_attr_show(struct kobject *kobj, struct attribute *attr, channel_attr_show() argument 137 struct most_c_obj *c_obj = to_c_obj(kobj); channel_attr_show() 147 * @kobj: pointer to its kobject 152 static ssize_t channel_attr_store(struct kobject *kobj, channel_attr_store() argument 158 struct most_c_obj *c_obj = to_c_obj(kobj); channel_attr_store() 243 * @kobj: pointer to channel's kobject 245 static void most_channel_release(struct kobject *kobj) most_channel_release() argument 247 struct most_c_obj *c = to_c_obj(kobj); most_channel_release() 543 c->kobj.kset = most_channel_kset; create_most_c_obj() 544 retval = kobject_init_and_add(&c->kobj, &most_channel_ktype, parent, create_most_c_obj() 547 kobject_put(&c->kobj); create_most_c_obj() 550 kobject_uevent(&c->kobj, KOBJ_ADD); create_most_c_obj() 574 kobject_put(&c->kobj); destroy_most_c_obj() 608 * @kobj: pointer to kobject 612 static ssize_t instance_attr_show(struct kobject *kobj, instance_attr_show() argument 620 instance_obj = to_inst_obj(kobj); instance_attr_show() 630 * @kobj: pointer to kobject 635 static ssize_t instance_attr_store(struct kobject *kobj, instance_attr_store() argument 644 instance_obj = to_inst_obj(kobj); instance_attr_store() 659 * @kobj: pointer to instance's kobject 663 static void most_inst_release(struct kobject *kobj) most_inst_release() argument 665 struct most_inst_obj *inst = to_inst_obj(kobj); most_inst_release() 742 inst->kobj.kset = most_inst_kset; create_most_inst_obj() 743 retval = kobject_init_and_add(&inst->kobj, &most_inst_ktype, NULL, create_most_inst_obj() 746 kobject_put(&inst->kobj); create_most_inst_obj() 749 kobject_uevent(&inst->kobj, KOBJ_ADD); create_most_inst_obj() 766 * reference count of the inst->kobj destroy_most_inst_obj() 771 kobject_put(&inst->kobj); destroy_most_inst_obj() 778 struct kobject kobj; member in struct:most_aim_obj 785 #define to_aim_obj(d) container_of(d, struct most_aim_obj, kobj) 810 * @kobj: pointer to kobject 814 static ssize_t aim_attr_show(struct kobject *kobj, aim_attr_show() argument 822 aim_obj = to_aim_obj(kobj); aim_attr_show() 832 * @kobj: pointer to kobject 837 static ssize_t aim_attr_store(struct kobject *kobj, aim_attr_store() argument 846 aim_obj = to_aim_obj(kobj); aim_attr_store() 860 * @kobj: pointer to AIM's kobject 862 static void most_aim_release(struct kobject *kobj) most_aim_release() argument 864 struct most_aim_obj *aim_obj = to_aim_obj(kobj); most_aim_release() 929 if (!strcmp(kobject_name(&i->kobj), mdev)) { get_channel_by_name() 938 if (!strcmp(kobject_name(&c->kobj), mdev_ch)) { get_channel_by_name() 1010 &c->cfg, &c->kobj, mdev_devnod); store_add_link() 1102 most_aim->kobj.kset = most_aim_kset; create_most_aim_obj() 1103 retval = kobject_init_and_add(&most_aim->kobj, &most_aim_ktype, create_most_aim_obj() 1106 kobject_put(&most_aim->kobj); create_most_aim_obj() 1109 kobject_uevent(&most_aim->kobj, KOBJ_ADD); create_most_aim_obj() 1122 kobject_put(&p->kobj); destroy_most_aim_obj() 1788 c = create_most_c_obj(channel_name, &inst->kobj); most_register_interface() 1817 return &inst->kobj; most_register_interface() 1845 pr_info("deregistering MOST device %s (%s)\n", i->kobj.name, most_deregister_interface() 1944 kset_create_and_add("aims", NULL, &class_glue_dir->kobj); most_init() 1949 kset_create_and_add("devices", NULL, &class_glue_dir->kobj); most_init()
|
/linux-4.4.14/net/core/ |
H A D | net-sysfs.c | 629 #define to_rx_queue(obj) container_of(obj, struct netdev_rx_queue, kobj) 631 static ssize_t rx_queue_attr_show(struct kobject *kobj, struct attribute *attr, rx_queue_attr_show() argument 635 struct netdev_rx_queue *queue = to_rx_queue(kobj); rx_queue_attr_show() 643 static ssize_t rx_queue_attr_store(struct kobject *kobj, struct attribute *attr, rx_queue_attr_store() argument 647 struct netdev_rx_queue *queue = to_rx_queue(kobj); rx_queue_attr_store() 842 static void rx_queue_release(struct kobject *kobj) rx_queue_release() argument 844 struct netdev_rx_queue *queue = to_rx_queue(kobj); rx_queue_release() 863 memset(kobj, 0, sizeof(*kobj)); rx_queue_release() 867 static const void *rx_queue_namespace(struct kobject *kobj) rx_queue_namespace() argument 869 struct netdev_rx_queue *queue = to_rx_queue(kobj); rx_queue_namespace() 889 struct kobject *kobj = &queue->kobj; rx_queue_add_kobject() local 892 kobj->kset = dev->queues_kset; rx_queue_add_kobject() 893 error = kobject_init_and_add(kobj, &rx_queue_ktype, NULL, rx_queue_add_kobject() 899 error = sysfs_create_group(kobj, dev->sysfs_rx_queue_group); rx_queue_add_kobject() 904 kobject_uevent(kobj, KOBJ_ADD); rx_queue_add_kobject() 909 kobject_put(kobj); rx_queue_add_kobject() 935 sysfs_remove_group(&dev->_rx[i].kobj, net_rx_queue_update_kobjects() 937 kobject_put(&dev->_rx[i].kobj); net_rx_queue_update_kobjects() 960 #define to_netdev_queue(obj) container_of(obj, struct netdev_queue, kobj) 962 static ssize_t netdev_queue_attr_show(struct kobject *kobj, netdev_queue_attr_show() argument 966 struct netdev_queue *queue = to_netdev_queue(kobj); netdev_queue_attr_show() 974 static ssize_t netdev_queue_attr_store(struct kobject *kobj, netdev_queue_attr_store() argument 979 struct netdev_queue *queue = to_netdev_queue(kobj); netdev_queue_attr_store() 1251 static void netdev_queue_release(struct kobject *kobj) netdev_queue_release() argument 1253 struct netdev_queue *queue = to_netdev_queue(kobj); netdev_queue_release() 1255 memset(kobj, 0, sizeof(*kobj)); netdev_queue_release() 1259 static const void *netdev_queue_namespace(struct kobject *kobj) netdev_queue_namespace() argument 1261 struct netdev_queue *queue = to_netdev_queue(kobj); netdev_queue_namespace() 1281 struct kobject *kobj = &queue->kobj; netdev_queue_add_kobject() local 1284 kobj->kset = dev->queues_kset; netdev_queue_add_kobject() 1285 error = kobject_init_and_add(kobj, &netdev_queue_ktype, NULL, netdev_queue_add_kobject() 1291 error = sysfs_create_group(kobj, &dql_group); netdev_queue_add_kobject() 1296 kobject_uevent(kobj, KOBJ_ADD); netdev_queue_add_kobject() 1301 kobject_put(kobj); netdev_queue_add_kobject() 1325 sysfs_remove_group(&queue->kobj, &dql_group); netdev_queue_update_kobjects() 1327 kobject_put(&queue->kobj); netdev_queue_update_kobjects() 1342 NULL, &dev->dev.kobj); register_queue_kobjects() 1509 kobject_get(&dev->kobj); netdev_unregister_kobject()
|
/linux-4.4.14/arch/s390/kernel/ |
H A D | ipl.c | 194 static ssize_t sys_##_prefix##_##_name##_show(struct kobject *kobj, \ 202 static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \ 235 static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \ 252 static ssize_t sys_##_prefix##_##_name##_store(struct kobject *kobj, \ 299 static ssize_t ipl_type_show(struct kobject *kobj, struct kobj_attribute *attr, ipl_type_show() argument 352 static ssize_t ipl_vm_parm_show(struct kobject *kobj, ipl_vm_parm_show() argument 419 static ssize_t sys_ipl_device_show(struct kobject *kobj, sys_ipl_device_show() argument 438 static ssize_t ipl_parameter_read(struct file *filp, struct kobject *kobj, ipl_parameter_read() argument 449 static ssize_t ipl_scp_data_read(struct file *filp, struct kobject *kobj, ipl_scp_data_read() argument 478 static ssize_t ipl_ccw_loadparm_show(struct kobject *kobj, ipl_ccw_loadparm_show() argument 590 rc = sysfs_create_group(&ipl_kset->kobj, ipl_init() 593 rc = sysfs_create_group(&ipl_kset->kobj, ipl_init() 598 rc = sysfs_create_group(&ipl_kset->kobj, &ipl_fcp_attr_group); ipl_init() 601 rc = sysfs_create_group(&ipl_kset->kobj, &ipl_nss_attr_group); ipl_init() 604 rc = sysfs_create_group(&ipl_kset->kobj, ipl_init() 668 static ssize_t reipl_nss_vmparm_show(struct kobject *kobj, reipl_nss_vmparm_show() argument 674 static ssize_t reipl_nss_vmparm_store(struct kobject *kobj, reipl_nss_vmparm_store() argument 682 static ssize_t reipl_ccw_vmparm_show(struct kobject *kobj, reipl_ccw_vmparm_show() argument 688 static ssize_t reipl_ccw_vmparm_store(struct kobject *kobj, reipl_ccw_vmparm_store() argument 704 static ssize_t reipl_fcp_scpdata_read(struct file *filp, struct kobject *kobj, reipl_fcp_scpdata_read() argument 714 static ssize_t reipl_fcp_scpdata_write(struct file *filp, struct kobject *kobj, reipl_fcp_scpdata_write() argument 805 static ssize_t reipl_fcp_loadparm_show(struct kobject *kobj, reipl_fcp_loadparm_show() argument 811 static ssize_t reipl_fcp_loadparm_store(struct kobject *kobj, reipl_fcp_loadparm_store() argument 841 static ssize_t reipl_nss_loadparm_show(struct kobject *kobj, reipl_nss_loadparm_show() argument 847 static ssize_t reipl_nss_loadparm_store(struct kobject *kobj, reipl_nss_loadparm_store() argument 855 static ssize_t reipl_ccw_loadparm_show(struct kobject *kobj, reipl_ccw_loadparm_show() argument 861 static ssize_t reipl_ccw_loadparm_store(struct kobject *kobj, reipl_ccw_loadparm_store() argument 905 static ssize_t reipl_nss_name_show(struct kobject *kobj, reipl_nss_name_show() argument 914 static ssize_t reipl_nss_name_store(struct kobject *kobj, reipl_nss_name_store() argument 1016 static ssize_t reipl_type_show(struct kobject *kobj, reipl_type_show() argument 1022 static ssize_t reipl_type_store(struct kobject *kobj, reipl_type_store() argument 1169 rc = sysfs_create_group(&reipl_kset->kobj, &reipl_nss_attr_group); reipl_nss_init() 1201 rc = sysfs_create_group(&reipl_kset->kobj, reipl_ccw_init() 1206 rc = sysfs_create_group(&reipl_kset->kobj, reipl_ccw_init() 1241 &reipl_kset->kobj); reipl_fcp_init() 1247 rc = sysfs_create_group(&reipl_fcp_kset->kobj, &reipl_fcp_attr_group); reipl_fcp_init() 1304 rc = sysfs_create_file(&reipl_kset->kobj, &reipl_type_attr.attr); reipl_init() 1396 static ssize_t dump_type_show(struct kobject *kobj, dump_type_show() argument 1402 static ssize_t dump_type_store(struct kobject *kobj, dump_type_store() argument 1475 rc = sysfs_create_group(&dump_kset->kobj, &dump_ccw_attr_group); dump_ccw_init() 1499 rc = sysfs_create_group(&dump_kset->kobj, &dump_fcp_attr_group); dump_fcp_init() 1520 rc = sysfs_create_file(&dump_kset->kobj, &dump_type_attr.attr); dump_init() 1626 return sysfs_create_group(&vmcmd_kset->kobj, &vmcmd_attr_group); vmcmd_init() 1683 static ssize_t on_reboot_show(struct kobject *kobj, on_reboot_show() argument 1689 static ssize_t on_reboot_store(struct kobject *kobj, on_reboot_store() argument 1709 static ssize_t on_panic_show(struct kobject *kobj, on_panic_show() argument 1715 static ssize_t on_panic_store(struct kobject *kobj, on_panic_store() argument 1735 static ssize_t on_restart_show(struct kobject *kobj, on_restart_show() argument 1741 static ssize_t on_restart_store(struct kobject *kobj, on_restart_store() argument 1772 static ssize_t on_halt_show(struct kobject *kobj, on_halt_show() argument 1778 static ssize_t on_halt_store(struct kobject *kobj, on_halt_store() argument 1798 static ssize_t on_poff_show(struct kobject *kobj, on_poff_show() argument 1804 static ssize_t on_poff_store(struct kobject *kobj, on_poff_store() argument 1839 if (sysfs_create_group(&shutdown_actions_kset->kobj, shutdown_triggers_init()
|
/linux-4.4.14/drivers/uio/ |
H A D | uio.c | 44 struct kobject kobj; member in struct:uio_map 47 #define to_map(map) container_of(map, struct uio_map, kobj) 95 static void map_release(struct kobject *kobj) map_release() argument 97 struct uio_map *map = to_map(kobj); map_release() 101 static ssize_t map_type_show(struct kobject *kobj, struct attribute *attr, map_type_show() argument 104 struct uio_map *map = to_map(kobj); map_type_show() 127 struct kobject kobj; member in struct:uio_portio 130 #define to_portio(portio) container_of(portio, struct uio_portio, kobj) 183 static void portio_release(struct kobject *kobj) portio_release() argument 185 struct uio_portio *portio = to_portio(kobj); portio_release() 189 static ssize_t portio_type_show(struct kobject *kobj, struct attribute *attr, portio_type_show() argument 192 struct uio_portio *portio = to_portio(kobj); portio_type_show() 273 &idev->dev->kobj); uio_dev_add_attributes() 280 kobject_init(&map->kobj, &map_attr_type); uio_dev_add_attributes() 283 ret = kobject_add(&map->kobj, idev->map_dir, "map%d", mi); uio_dev_add_attributes() 286 ret = kobject_uevent(&map->kobj, KOBJ_ADD); uio_dev_add_attributes() 298 &idev->dev->kobj); uio_dev_add_attributes() 305 kobject_init(&portio->kobj, &portio_attr_type); uio_dev_add_attributes() 308 ret = kobject_add(&portio->kobj, idev->portio_dir, uio_dev_add_attributes() 312 ret = kobject_uevent(&portio->kobj, KOBJ_ADD); uio_dev_add_attributes() 325 kobject_put(&portio->kobj); uio_dev_add_attributes() 334 kobject_put(&map->kobj); uio_dev_add_attributes() 351 kobject_put(&mem->map->kobj); uio_dev_del_attributes() 359 kobject_put(&port->portio->kobj); uio_dev_del_attributes() 738 kobject_set_name(&cdev->kobj, "%s", name); uio_major_init() 748 kobject_put(&cdev->kobj); uio_major_init()
|
/linux-4.4.14/arch/x86/kernel/cpu/mcheck/ |
H A D | mce_amd.c | 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) show() argument 537 struct threshold_block *b = to_block(kobj); show() 546 static ssize_t store(struct kobject *kobj, struct attribute *attr, store() argument 549 struct threshold_block *b = to_block(kobj); store() 620 err = kobject_init_and_add(&b->kobj, &threshold_ktype, allocate_threshold_blocks() 621 per_cpu(threshold_banks, cpu)[bank]->kobj, allocate_threshold_blocks() 640 kobject_uevent(&b->kobj, KOBJ_ADD); allocate_threshold_blocks() 646 kobject_put(&b->kobj); allocate_threshold_blocks() 660 err = kobject_add(&b->blocks->kobj, b->kobj, b->blocks->kobj.name); __threshold_add_blocks() 666 err = kobject_add(&pos->kobj, b->kobj, pos->kobj.name); list_for_each_entry_safe() 669 kobject_del(&pos->kobj); list_for_each_entry_safe() 692 err = kobject_add(b->kobj, &dev->kobj, name); threshold_create_bank() 711 b->kobj = kobject_create_and_add(name, &dev->kobj); threshold_create_bank() 712 if (!b->kobj) { threshold_create_bank() 776 kobject_put(&pos->kobj); deallocate_threshold_block() 790 kobject_del(b->kobj); __threshold_remove_blocks() 793 kobject_del(&pos->kobj); __threshold_remove_blocks() 826 kobject_del(b->kobj); threshold_remove_bank() 827 kobject_put(b->kobj); threshold_remove_bank()
|
/linux-4.4.14/drivers/s390/char/ |
H A D | sclp_cpi_sys.c | 221 static ssize_t system_name_show(struct kobject *kobj, system_name_show() argument 232 static ssize_t system_name_store(struct kobject *kobj, system_name_store() argument 253 static ssize_t sysplex_name_show(struct kobject *kobj, sysplex_name_show() argument 264 static ssize_t sysplex_name_store(struct kobject *kobj, sysplex_name_store() argument 285 static ssize_t system_type_show(struct kobject *kobj, system_type_show() argument 296 static ssize_t system_type_store(struct kobject *kobj, system_type_store() argument 317 static ssize_t system_level_show(struct kobject *kobj, system_level_show() argument 328 static ssize_t system_level_store(struct kobject *kobj, system_level_store() argument 354 static ssize_t set_store(struct kobject *kobj, set_store() argument 422 rc = sysfs_create_group(&cpi_kset->kobj, &cpi_attr_group); cpi_init()
|
H A D | tape_class.c | 84 &device->kobj, register_tape_dev() 85 &tcd->class_device->kobj, register_tape_dev() 109 sysfs_remove_link(&device->kobj, tcd->mode_name); unregister_tape_dev()
|
H A D | sclp_ocf.c | 38 kobject_uevent(&ocf_kset->kobj, KOBJ_CHANGE); sclp_ocf_change_notify() 88 static ssize_t cpc_name_show(struct kobject *kobj, cpc_name_show() argument 102 static ssize_t hmc_network_show(struct kobject *kobj, hmc_network_show() argument 135 rc = sysfs_create_group(&ocf_kset->kobj, &ocf_attr_group); ocf_init()
|
H A D | sclp_config.c | 39 kobject_uevent(&dev->kobj, KOBJ_CHANGE); for_each_online_cpu()
|
/linux-4.4.14/net/bridge/ |
H A D | br_sysfs_if.c | 224 #define to_brport(obj) container_of(obj, struct net_bridge_port, kobj) 226 static ssize_t brport_show(struct kobject *kobj, brport_show() argument 230 struct net_bridge_port *p = to_brport(kobj); brport_show() 235 static ssize_t brport_store(struct kobject *kobj, brport_store() argument 240 struct net_bridge_port *p = to_brport(kobj); brport_store() 280 err = sysfs_create_link(&p->kobj, &br->dev->dev.kobj, br_sysfs_addif() 286 err = sysfs_create_file(&p->kobj, &((*a)->attr)); br_sysfs_addif() 292 return sysfs_create_link(br->ifobj, &p->kobj, p->sysfs_name); br_sysfs_addif() 307 err = sysfs_rename_link(br->ifobj, &p->kobj, br_sysfs_renameif()
|
H A D | br_if.c | 194 static void release_nbp(struct kobject *kobj) release_nbp() argument 197 = container_of(kobj, struct net_bridge_port, kobj); release_nbp() 216 kobject_put(&p->kobj); destroy_nbp() 266 kobject_uevent(&p->kobj, KOBJ_REMOVE); del_nbp() 267 kobject_del(&p->kobj); del_nbp() 477 err = kobject_init_and_add(&p->kobj, &brport_ktype, &(dev->dev.kobj), br_add_if() 532 kobject_uevent(&p->kobj, KOBJ_ADD); br_add_if() 544 kobject_put(&p->kobj); br_add_if()
|
/linux-4.4.14/drivers/fmc/ |
H A D | fmc-core.c | 81 static ssize_t fmc_read_eeprom(struct file *file, struct kobject *kobj, fmc_read_eeprom() argument 89 dev = container_of(kobj, struct device, kobj); fmc_read_eeprom() 102 static ssize_t fmc_write_eeprom(struct file *file, struct kobject *kobj, fmc_write_eeprom() argument 109 dev = container_of(kobj, struct device, kobj); fmc_write_eeprom() 227 "\"%s\"\n", fmc->slot_id, fmc->dev.kobj.name); fmc_device_register_n() 230 ret = sysfs_create_bin_file(&fmc->dev.kobj, &fmc_eeprom_attr); fmc_device_register_n() 249 sysfs_remove_bin_file(&devs[i]->dev.kobj, &fmc_eeprom_attr); fmc_device_register_n() 276 sysfs_remove_bin_file(&devs[i]->dev.kobj, &fmc_eeprom_attr); fmc_device_unregister_n()
|
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/linux/ |
H A D | linux-sysctl.c | 56 ssize_t (*show)(struct kobject *kobj, struct attribute *attr, 58 ssize_t (*store)(struct kobject *kobj, struct attribute *attr, 64 static ssize_t static_uintvalue_show(struct kobject *kobj, static_uintvalue_show() argument 73 static ssize_t static_uintvalue_store(struct kobject *kobj, static_uintvalue_store() argument 99 static ssize_t max_dirty_mb_show(struct kobject *kobj, struct attribute *attr, max_dirty_mb_show() argument 106 static ssize_t max_dirty_mb_store(struct kobject *kobj, struct attribute *attr, max_dirty_mb_store() argument
|
H A D | linux-module.c | 216 static ssize_t version_show(struct kobject *kobj, struct attribute *attr, version_show() argument 222 static ssize_t pinger_show(struct kobject *kobj, struct attribute *attr, pinger_show() argument 228 static ssize_t health_show(struct kobject *kobj, struct attribute *attr, health_show() argument 269 static ssize_t jobid_var_show(struct kobject *kobj, struct attribute *attr, jobid_var_show() argument 275 static ssize_t jobid_var_store(struct kobject *kobj, struct attribute *attr, jobid_var_store() argument 293 static ssize_t jobid_name_show(struct kobject *kobj, struct attribute *attr, jobid_name_show() argument 299 static ssize_t jobid_name_store(struct kobject *kobj, struct attribute *attr, jobid_name_store() argument
|
/linux-4.4.14/drivers/infiniband/hw/mlx4/ |
H A D | sysfs.c | 159 sysfs_remove_file((_dentry)->kobj, &(_dentry)->dentry.attr); \ 181 vdentry->kobj = _kobj; create_sysfs_entry() 190 ret = sysfs_create_file(vdentry->kobj, &vdentry->dentry.attr); create_sysfs_entry() 368 struct kobject kobj; member in struct:mlx4_port 379 static void mlx4_port_release(struct kobject *kobj) mlx4_port_release() argument 381 struct mlx4_port *p = container_of(kobj, struct mlx4_port, kobj); mlx4_port_release() 401 static ssize_t port_attr_show(struct kobject *kobj, port_attr_show() argument 406 struct mlx4_port *p = container_of(kobj, struct mlx4_port, kobj); port_attr_show() 413 static ssize_t port_attr_store(struct kobject *kobj, port_attr_store() argument 419 struct mlx4_port *p = container_of(kobj, struct mlx4_port, kobj); port_attr_store() 606 ret = sysfs_create_file(&p->kobj, &p->smi_enabled.attr); add_vf_smi_entries() 617 ret = sysfs_create_file(&p->kobj, &p->enable_smi_admin.attr); add_vf_smi_entries() 620 sysfs_remove_file(&p->kobj, &p->smi_enabled.attr); add_vf_smi_entries() 634 sysfs_remove_file(&p->kobj, &p->smi_enabled.attr); remove_vf_smi_entries() 635 sysfs_remove_file(&p->kobj, &p->enable_smi_admin.attr); remove_vf_smi_entries() 654 ret = kobject_init_and_add(&p->kobj, &port_type, add_port() 670 ret = sysfs_create_group(&p->kobj, &p->pkey_group); add_port() 681 ret = sysfs_create_group(&p->kobj, &p->gid_group); add_port() 689 list_add_tail(&p->kobj.entry, &dev->pkeys.pkey_port_list[slave]); add_port() 753 mport = container_of(p, struct mlx4_port, kobj); register_one_pkey_tree() 798 port = container_of(p, struct mlx4_port, kobj); unregister_pkey_tree()
|
/linux-4.4.14/arch/cris/arch-v32/drivers/ |
H A D | iop_fw_load.c | 206 kobject_set_name(&iop_spu_device[0].kobj, "iop-spu0"); iop_fw_load_init() 207 kobject_add(&iop_spu_device[0].kobj); iop_fw_load_init() 209 kobject_set_name(&iop_spu_device[1].kobj, "iop-spu1"); iop_fw_load_init() 210 kobject_add(&iop_spu_device[1].kobj); iop_fw_load_init() 212 kobject_set_name(&iop_mpu_device.kobj, "iop-mpu"); iop_fw_load_init() 213 kobject_add(&iop_mpu_device.kobj); iop_fw_load_init()
|
/linux-4.4.14/drivers/hwmon/ |
H A D | mc13783-adc.c | 195 ret = sysfs_create_group(&pdev->dev.kobj, &mc13783_group_base); mc13783_adc_probe() 200 ret = sysfs_create_group(&pdev->dev.kobj, mc13783_adc_probe() 207 ret = sysfs_create_group(&pdev->dev.kobj, &mc13783_group_ts); mc13783_adc_probe() 225 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_ts); mc13783_adc_probe() 229 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_16chans); mc13783_adc_probe() 232 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_base); mc13783_adc_probe() 244 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_ts); mc13783_adc_remove() 247 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_16chans); mc13783_adc_remove() 249 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_base); mc13783_adc_remove()
|
H A D | ad7314.c | 122 ret = sysfs_create_group(&spi_dev->dev.kobj, &ad7314_group); ad7314_probe() 135 sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); ad7314_probe() 144 sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); ad7314_remove()
|
H A D | max1111.c | 228 err = sysfs_create_group(&spi->dev.kobj, &max1111_attr_group); max1111_probe() 234 err = sysfs_create_group(&spi->dev.kobj, &max1110_attr_group); max1111_probe() 255 sysfs_remove_group(&spi->dev.kobj, &max1110_attr_group); max1111_probe() 256 sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group); max1111_probe() 268 sysfs_remove_group(&spi->dev.kobj, &max1110_attr_group); max1111_remove() 269 sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group); max1111_remove()
|
H A D | smsc47m1.c | 695 sysfs_remove_group(&dev->kobj, &smsc47m1_group); smsc47m1_remove_files() 696 sysfs_remove_group(&dev->kobj, &smsc47m1_group_fan1); smsc47m1_remove_files() 697 sysfs_remove_group(&dev->kobj, &smsc47m1_group_fan2); smsc47m1_remove_files() 698 sysfs_remove_group(&dev->kobj, &smsc47m1_group_fan3); smsc47m1_remove_files() 699 sysfs_remove_group(&dev->kobj, &smsc47m1_group_pwm1); smsc47m1_remove_files() 700 sysfs_remove_group(&dev->kobj, &smsc47m1_group_pwm2); smsc47m1_remove_files() 701 sysfs_remove_group(&dev->kobj, &smsc47m1_group_pwm3); smsc47m1_remove_files() 776 err = sysfs_create_group(&dev->kobj, smsc47m1_probe() 784 err = sysfs_create_group(&dev->kobj, smsc47m1_probe() 792 err = sysfs_create_group(&dev->kobj, smsc47m1_probe() 800 err = sysfs_create_group(&dev->kobj, smsc47m1_probe() 808 err = sysfs_create_group(&dev->kobj, smsc47m1_probe() 816 err = sysfs_create_group(&dev->kobj, smsc47m1_probe() 823 err = sysfs_create_group(&dev->kobj, &smsc47m1_group); smsc47m1_probe()
|
H A D | nct7904.c | 176 static umode_t nct7904_fanin_is_visible(struct kobject *kobj, nct7904_fanin_is_visible() argument 179 struct device *dev = container_of(kobj, struct device, kobj); nct7904_fanin_is_visible() 258 static umode_t nct7904_vsen_is_visible(struct kobject *kobj, nct7904_vsen_is_visible() argument 261 struct device *dev = container_of(kobj, struct device, kobj); nct7904_vsen_is_visible() 344 static umode_t nct7904_tcpu_is_visible(struct kobject *kobj, nct7904_tcpu_is_visible() argument 347 struct device *dev = container_of(kobj, struct device, kobj); nct7904_tcpu_is_visible()
|
H A D | pcf8591.c | 215 err = sysfs_create_group(&client->dev.kobj, &pcf8591_attr_group); pcf8591_probe() 242 sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group_opt); pcf8591_probe() 243 sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group); pcf8591_probe() 252 sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group_opt); pcf8591_remove() 253 sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group); pcf8591_remove()
|
H A D | jz4740-hwmon.c | 141 ret = sysfs_create_group(&pdev->dev.kobj, &jz4740_hwmon_attr_group); jz4740_hwmon_probe() 156 sysfs_remove_group(&pdev->dev.kobj, &jz4740_hwmon_attr_group); jz4740_hwmon_probe() 165 sysfs_remove_group(&pdev->dev.kobj, &jz4740_hwmon_attr_group); jz4740_hwmon_remove()
|
H A D | mcp3021.c | 142 err = sysfs_create_file(&client->dev.kobj, &dev_attr_in0_input.attr); mcp3021_probe() 155 sysfs_remove_file(&client->dev.kobj, &dev_attr_in0_input.attr); mcp3021_probe() 164 sysfs_remove_file(&client->dev.kobj, &dev_attr_in0_input.attr); mcp3021_remove()
|
H A D | abx500.c | 111 sysfs_notify(&data->pdev->dev.kobj, NULL, alarm_node); gpadc_monitor() 115 sysfs_notify(&data->pdev->dev.kobj, NULL, alarm_node); gpadc_monitor() 263 static umode_t abx500_attrs_visible(struct kobject *kobj, abx500_attrs_visible() argument 266 struct device *dev = container_of(kobj, struct device, kobj); abx500_attrs_visible() 409 err = sysfs_create_group(&pdev->dev.kobj, &abx500_temp_group); abx500_temp_probe() 432 sysfs_remove_group(&pdev->dev.kobj, &abx500_temp_group); abx500_temp_probe() 442 sysfs_remove_group(&pdev->dev.kobj, &abx500_temp_group); abx500_temp_remove()
|
/linux-4.4.14/drivers/misc/ |
H A D | ds1682.c | 141 static ssize_t ds1682_eeprom_read(struct file *filp, struct kobject *kobj, ds1682_eeprom_read() argument 145 struct i2c_client *client = kobj_to_i2c_client(kobj); ds1682_eeprom_read() 159 static ssize_t ds1682_eeprom_write(struct file *filp, struct kobject *kobj, ds1682_eeprom_write() argument 163 struct i2c_client *client = kobj_to_i2c_client(kobj); ds1682_eeprom_write() 201 rc = sysfs_create_group(&client->dev.kobj, &ds1682_group); ds1682_probe() 205 rc = sysfs_create_bin_file(&client->dev.kobj, &ds1682_eeprom_attr); ds1682_probe() 212 sysfs_remove_group(&client->dev.kobj, &ds1682_group); ds1682_probe() 219 sysfs_remove_bin_file(&client->dev.kobj, &ds1682_eeprom_attr); ds1682_remove() 220 sysfs_remove_group(&client->dev.kobj, &ds1682_group); ds1682_remove()
|
H A D | pch_phub.c | 493 static ssize_t pch_phub_bin_read(struct file *filp, struct kobject *kobj, pch_phub_bin_read() argument 507 dev_get_drvdata(container_of(kobj, struct device, kobj)); pch_phub_bin_read() 562 static ssize_t pch_phub_bin_write(struct file *filp, struct kobject *kobj, pch_phub_bin_write() argument 571 dev_get_drvdata(container_of(kobj, struct device, kobj)); pch_phub_bin_write() 715 ret = sysfs_create_file(&pdev->dev.kobj, pch_phub_probe() 720 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr); pch_phub_probe() 745 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr); pch_phub_probe() 768 ret = sysfs_create_file(&pdev->dev.kobj, pch_phub_probe() 772 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr); pch_phub_probe() 785 ret = sysfs_create_file(&pdev->dev.kobj, pch_phub_probe() 790 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr); pch_phub_probe() 807 sysfs_remove_file(&pdev->dev.kobj, &dev_attr_pch_mac.attr); pch_phub_probe() 825 sysfs_remove_file(&pdev->dev.kobj, &dev_attr_pch_mac.attr); pch_phub_remove() 826 sysfs_remove_bin_file(&pdev->dev.kobj, &pch_bin_attr); pch_phub_remove()
|
H A D | ti_dac7512.c | 66 return sysfs_create_group(&spi->dev.kobj, &dac7512_attr_group); dac7512_probe() 71 sysfs_remove_group(&spi->dev.kobj, &dac7512_attr_group); dac7512_remove()
|
H A D | hmc6352.c | 119 res = sysfs_create_group(&client->dev.kobj, &m_compass_gr); hmc6352_probe() 131 sysfs_remove_group(&client->dev.kobj, &m_compass_gr); hmc6352_remove()
|
/linux-4.4.14/drivers/of/ |
H A D | of_private.h | 39 static inline struct device_node *kobj_to_device_node(struct kobject *kobj) kobj_to_device_node() argument 41 return container_of(kobj, struct device_node, kobj); kobj_to_device_node() 47 extern void of_node_release(struct kobject *kobj);
|
/linux-4.4.14/drivers/parisc/ |
H A D | pdc_stable.c | 106 struct kobject kobj; member in struct:pdcspath_entry 137 #define to_pdcspath_entry(obj) container_of(obj, struct pdcspath_entry, kobj) 335 sysfs_remove_link(&entry->kobj, "device"); pdcspath_hwpath_write() 336 ret = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device"); pdcspath_hwpath_write() 443 * @kobj: The kobject to get info from. 448 pdcspath_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) pdcspath_attr_show() argument 450 struct pdcspath_entry *entry = to_pdcspath_entry(kobj); pdcspath_attr_show() 462 * @kobj: The kobject to write info to. 468 pdcspath_attr_store(struct kobject *kobj, struct attribute *attr, pdcspath_attr_store() argument 471 struct pdcspath_entry *entry = to_pdcspath_entry(kobj); pdcspath_attr_store() 528 static ssize_t pdcs_size_read(struct kobject *kobj, pdcs_size_read() argument 548 static ssize_t pdcs_auto_read(struct kobject *kobj, pdcs_auto_read() argument 573 static ssize_t pdcs_autoboot_read(struct kobject *kobj, pdcs_autoboot_read() argument 576 return pdcs_auto_read(kobj, attr, buf, PF_AUTOBOOT); pdcs_autoboot_read() 583 static ssize_t pdcs_autosearch_read(struct kobject *kobj, pdcs_autosearch_read() argument 586 return pdcs_auto_read(kobj, attr, buf, PF_AUTOSEARCH); pdcs_autosearch_read() 595 static ssize_t pdcs_timer_read(struct kobject *kobj, pdcs_timer_read() argument 620 static ssize_t pdcs_osid_read(struct kobject *kobj, pdcs_osid_read() argument 640 static ssize_t pdcs_osdep1_read(struct kobject *kobj, pdcs_osdep1_read() argument 666 static ssize_t pdcs_diagnostic_read(struct kobject *kobj, pdcs_diagnostic_read() argument 690 static ssize_t pdcs_fastsize_read(struct kobject *kobj, pdcs_fastsize_read() argument 718 static ssize_t pdcs_osdep2_read(struct kobject *kobj, pdcs_osdep2_read() argument 754 static ssize_t pdcs_auto_write(struct kobject *kobj, pdcs_auto_write() argument 826 static ssize_t pdcs_autoboot_write(struct kobject *kobj, pdcs_autoboot_write() argument 830 return pdcs_auto_write(kobj, attr, buf, count, PF_AUTOBOOT); pdcs_autoboot_write() 842 static ssize_t pdcs_autosearch_write(struct kobject *kobj, pdcs_autosearch_write() argument 846 return pdcs_auto_write(kobj, attr, buf, count, PF_AUTOSEARCH); pdcs_autosearch_write() 858 static ssize_t pdcs_osdep1_write(struct kobject *kobj, pdcs_osdep1_write() argument 895 static ssize_t pdcs_osdep2_write(struct kobject *kobj, pdcs_osdep2_write() argument 992 entry->kobj.kset = paths_kset; pdcs_register_pathentries() 993 err = kobject_init_and_add(&entry->kobj, &ktype_pdcspath, NULL, pdcs_register_pathentries() 1004 err = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device"); pdcs_register_pathentries() 1009 kobject_uevent(&entry->kobj, KOBJ_ADD); pdcs_register_pathentries() 1027 kobject_put(&entry->kobj); pdcs_unregister_pathentries()
|
/linux-4.4.14/fs/ext4/ |
H A D | sysfs.c | 251 static ssize_t ext4_attr_show(struct kobject *kobj, ext4_attr_show() argument 254 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, ext4_attr_show() 290 static ssize_t ext4_attr_store(struct kobject *kobj, ext4_attr_store() argument 294 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, ext4_attr_store() 320 static void ext4_sb_release(struct kobject *kobj) ext4_sb_release() argument 322 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, ext4_sb_release() 343 .kobj = {.ktype = &ext4_ktype}, 426 kobject_set_name(&ext4_kset.kobj, "ext4"); ext4_init_sysfs() 427 ext4_kset.kobj.parent = fs_kobj; ext4_init_sysfs()
|
/linux-4.4.14/drivers/gpu/drm/i915/ |
H A D | i915_sysfs.c | 162 i915_l3_read(struct file *filp, struct kobject *kobj, i915_l3_read() argument 166 struct device *dev = container_of(kobj, struct device, kobj); i915_l3_read() 198 i915_l3_write(struct file *filp, struct kobject *kobj, i915_l3_write() argument 202 struct device *dev = container_of(kobj, struct device, kobj); i915_l3_write() 518 static ssize_t error_state_read(struct file *filp, struct kobject *kobj, error_state_read() argument 523 struct device *kdev = container_of(kobj, struct device, kobj); error_state_read() 554 static ssize_t error_state_write(struct file *file, struct kobject *kobj, error_state_write() argument 558 struct device *kdev = container_of(kobj, struct device, kobj); error_state_write() 589 ret = sysfs_merge_group(&dev->primary->kdev->kobj, i915_setup_sysfs() 595 ret = sysfs_merge_group(&dev->primary->kdev->kobj, i915_setup_sysfs() 601 ret = sysfs_merge_group(&dev->primary->kdev->kobj, i915_setup_sysfs() 622 ret = sysfs_create_files(&dev->primary->kdev->kobj, vlv_attrs); i915_setup_sysfs() 624 ret = sysfs_create_files(&dev->primary->kdev->kobj, gen6_attrs); i915_setup_sysfs() 628 ret = sysfs_create_bin_file(&dev->primary->kdev->kobj, i915_setup_sysfs() 636 sysfs_remove_bin_file(&dev->primary->kdev->kobj, &error_state_attr); i915_teardown_sysfs() 638 sysfs_remove_files(&dev->primary->kdev->kobj, vlv_attrs); i915_teardown_sysfs() 640 sysfs_remove_files(&dev->primary->kdev->kobj, gen6_attrs); i915_teardown_sysfs() 644 sysfs_unmerge_group(&dev->primary->kdev->kobj, &rc6_attr_group); i915_teardown_sysfs() 645 sysfs_unmerge_group(&dev->primary->kdev->kobj, &rc6p_attr_group); i915_teardown_sysfs()
|
/linux-4.4.14/drivers/infiniband/core/ |
H A D | sysfs.c | 44 struct kobject kobj; member in struct:ib_port 70 static ssize_t port_attr_show(struct kobject *kobj, port_attr_show() argument 75 struct ib_port *p = container_of(kobj, struct ib_port, kobj); port_attr_show() 431 static void ib_port_release(struct kobject *kobj) ib_port_release() argument 433 struct ib_port *p = container_of(kobj, struct ib_port, kobj); ib_port_release() 523 ret = kobject_init_and_add(&p->kobj, &port_type, add_port() 531 ret = sysfs_create_group(&p->kobj, &pma_group); add_port() 542 ret = sysfs_create_group(&p->kobj, &p->gid_group); add_port() 554 ret = sysfs_create_group(&p->kobj, &p->pkey_group); add_port() 559 ret = port_callback(device, port_num, &p->kobj); add_port() 564 list_add_tail(&p->kobj.entry, &device->port_list); add_port() 566 kobject_uevent(&p->kobj, KOBJ_ADD); add_port() 570 sysfs_remove_group(&p->kobj, &p->pkey_group); add_port() 580 sysfs_remove_group(&p->kobj, &p->gid_group); add_port() 590 sysfs_remove_group(&p->kobj, &pma_group); add_port() 593 kobject_put(&p->kobj); add_port() 801 struct ib_port *port = container_of(p, struct ib_port, kobj); free_port_list_attributes() 836 &class_dev->kobj); ib_device_register_sysfs() 855 ret = sysfs_create_group(&class_dev->kobj, &iw_stats_group); ib_device_register_sysfs() 875 struct kobject *kobj_dev = kobject_get(&device->dev.kobj); ib_device_unregister_sysfs()
|
/linux-4.4.14/drivers/scsi/qla4xxx/ |
H A D | ql4_attr.c | 13 qla4_8xxx_sysfs_read_fw_dump(struct file *filep, struct kobject *kobj, qla4_8xxx_sysfs_read_fw_dump() argument 17 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, qla4_8xxx_sysfs_read_fw_dump() 18 struct device, kobj))); qla4_8xxx_sysfs_read_fw_dump() 31 qla4_8xxx_sysfs_write_fw_dump(struct file *filep, struct kobject *kobj, qla4_8xxx_sysfs_write_fw_dump() argument 35 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, qla4_8xxx_sysfs_write_fw_dump() 36 struct device, kobj))); qla4_8xxx_sysfs_write_fw_dump() 133 ret = sysfs_create_bin_file(&host->shost_gendev.kobj, qla4_8xxx_alloc_sysfs_attr() 148 sysfs_remove_bin_file(&host->shost_gendev.kobj, qla4_8xxx_free_sysfs_attr()
|
/linux-4.4.14/drivers/rtc/ |
H A D | rtc-ds1742.c | 127 static ssize_t ds1742_nvram_read(struct file *filp, struct kobject *kobj, ds1742_nvram_read() argument 131 struct device *dev = container_of(kobj, struct device, kobj); ds1742_nvram_read() 142 static ssize_t ds1742_nvram_write(struct file *filp, struct kobject *kobj, ds1742_nvram_write() argument 146 struct device *dev = container_of(kobj, struct device, kobj); ds1742_nvram_write() 206 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pdata->nvram_attr); ds1742_rtc_probe() 218 sysfs_remove_bin_file(&pdev->dev.kobj, &pdata->nvram_attr); ds1742_rtc_remove()
|
H A D | rtc-rp5c01.c | 163 static ssize_t rp5c01_nvram_read(struct file *filp, struct kobject *kobj, rp5c01_nvram_read() argument 167 struct device *dev = container_of(kobj, struct device, kobj); rp5c01_nvram_read() 193 static ssize_t rp5c01_nvram_write(struct file *filp, struct kobject *kobj, rp5c01_nvram_write() argument 197 struct device *dev = container_of(kobj, struct device, kobj); rp5c01_nvram_write() 258 error = sysfs_create_bin_file(&dev->dev.kobj, &priv->nvram_attr); rp5c01_rtc_probe() 269 sysfs_remove_bin_file(&dev->dev.kobj, &priv->nvram_attr); rp5c01_rtc_remove()
|
H A D | rtc-tx4939.c | 192 static ssize_t tx4939_rtc_nvram_read(struct file *filp, struct kobject *kobj, tx4939_rtc_nvram_read() argument 196 struct device *dev = container_of(kobj, struct device, kobj); tx4939_rtc_nvram_read() 210 static ssize_t tx4939_rtc_nvram_write(struct file *filp, struct kobject *kobj, tx4939_rtc_nvram_write() argument 214 struct device *dev = container_of(kobj, struct device, kobj); tx4939_rtc_nvram_write() 268 ret = sysfs_create_bin_file(&pdev->dev.kobj, &tx4939_rtc_nvram_attr); tx4939_rtc_probe() 277 sysfs_remove_bin_file(&pdev->dev.kobj, &tx4939_rtc_nvram_attr); tx4939_rtc_remove()
|
H A D | rtc-ds1553.c | 238 static ssize_t ds1553_nvram_read(struct file *filp, struct kobject *kobj, ds1553_nvram_read() argument 242 struct device *dev = container_of(kobj, struct device, kobj); ds1553_nvram_read() 253 static ssize_t ds1553_nvram_write(struct file *filp, struct kobject *kobj, ds1553_nvram_write() argument 257 struct device *dev = container_of(kobj, struct device, kobj); ds1553_nvram_write() 328 ret = sysfs_create_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr); ds1553_rtc_probe() 340 sysfs_remove_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr); ds1553_rtc_remove()
|
H A D | rtc-stk17ta8.c | 247 static ssize_t stk17ta8_nvram_read(struct file *filp, struct kobject *kobj, stk17ta8_nvram_read() argument 251 struct device *dev = container_of(kobj, struct device, kobj); stk17ta8_nvram_read() 262 static ssize_t stk17ta8_nvram_write(struct file *filp, struct kobject *kobj, stk17ta8_nvram_write() argument 266 struct device *dev = container_of(kobj, struct device, kobj); stk17ta8_nvram_write() 338 ret = sysfs_create_bin_file(&pdev->dev.kobj, &stk17ta8_nvram_attr); stk17ta8_rtc_probe() 347 sysfs_remove_bin_file(&pdev->dev.kobj, &stk17ta8_nvram_attr); stk17ta8_rtc_remove()
|
H A D | rtc-m48t59.c | 337 static ssize_t m48t59_nvram_read(struct file *filp, struct kobject *kobj, m48t59_nvram_read() argument 341 struct device *dev = container_of(kobj, struct device, kobj); m48t59_nvram_read() 358 static ssize_t m48t59_nvram_write(struct file *filp, struct kobject *kobj, m48t59_nvram_write() argument 362 struct device *dev = container_of(kobj, struct device, kobj); m48t59_nvram_write() 490 ret = sysfs_create_bin_file(&pdev->dev.kobj, &m48t59_nvram_attr); m48t59_rtc_probe() 499 sysfs_remove_bin_file(&pdev->dev.kobj, &m48t59_nvram_attr); m48t59_rtc_remove()
|
/linux-4.4.14/drivers/infiniband/hw/usnic/ |
H A D | usnic_ib_sysfs.c | 222 usnic_ib_qpn_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) usnic_ib_qpn_attr_show() argument 227 qp_grp = container_of(kobj, struct usnic_ib_qp_grp, kobj); usnic_ib_qpn_attr_show() 310 kobject_get(&us_ibdev->ib_dev.dev.kobj); usnic_ib_sysfs_register_usdev() 312 &us_ibdev->ib_dev.dev.kobj); usnic_ib_sysfs_register_usdev() 314 kobject_put(&us_ibdev->ib_dev.dev.kobj); usnic_ib_sysfs_register_usdev() 339 err = kobject_init_and_add(&qp_grp->kobj, &usnic_ib_qpn_type, usnic_ib_sysfs_qpn_add() 354 kobject_put(&qp_grp->kobj); usnic_ib_sysfs_qpn_remove()
|
/linux-4.4.14/drivers/misc/eeprom/ |
H A D | eeprom_93xx46.c | 37 eeprom_93xx46_bin_read(struct file *filp, struct kobject *kobj, eeprom_93xx46_bin_read() argument 48 dev = container_of(kobj, struct device, kobj); eeprom_93xx46_bin_read() 185 eeprom_93xx46_bin_write(struct file *filp, struct kobject *kobj, eeprom_93xx46_bin_write() argument 193 dev = container_of(kobj, struct device, kobj); eeprom_93xx46_bin_write() 338 err = sysfs_create_bin_file(&spi->dev.kobj, &edev->bin); eeprom_93xx46_probe() 365 sysfs_remove_bin_file(&spi->dev.kobj, &edev->bin); eeprom_93xx46_remove()
|
H A D | max6875.c | 109 static ssize_t max6875_read(struct file *filp, struct kobject *kobj, max6875_read() argument 113 struct i2c_client *client = kobj_to_i2c_client(kobj); max6875_read() 165 err = sysfs_create_bin_file(&client->dev.kobj, &user_eeprom_attr); max6875_probe() 184 sysfs_remove_bin_file(&client->dev.kobj, &user_eeprom_attr); max6875_remove()
|
H A D | eeprom.c | 83 static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, eeprom_read() argument 87 struct i2c_client *client = to_i2c_client(container_of(kobj, struct device, kobj)); eeprom_read() 187 return sysfs_create_bin_file(&client->dev.kobj, &eeprom_attr); eeprom_probe() 192 sysfs_remove_bin_file(&client->dev.kobj, &eeprom_attr); eeprom_remove()
|
H A D | at25.c | 135 at25_bin_read(struct file *filp, struct kobject *kobj, at25_bin_read() argument 142 dev = container_of(kobj, struct device, kobj); at25_bin_read() 269 at25_bin_write(struct file *filp, struct kobject *kobj, at25_bin_write() argument 276 dev = container_of(kobj, struct device, kobj); at25_bin_write() 427 err = sysfs_create_bin_file(&spi->dev.kobj, &at25->bin); at25_probe() 450 sysfs_remove_bin_file(&spi->dev.kobj, &at25->bin); at25_remove()
|
/linux-4.4.14/drivers/net/phy/ |
H A D | spi_ks8995.c | 212 static ssize_t ks8995_registers_read(struct file *filp, struct kobject *kobj, ks8995_registers_read() argument 218 dev = container_of(kobj, struct device, kobj); ks8995_registers_read() 224 static ssize_t ks8995_registers_write(struct file *filp, struct kobject *kobj, ks8995_registers_write() argument 230 dev = container_of(kobj, struct device, kobj); ks8995_registers_write() 313 err = sysfs_create_bin_file(&spi->dev.kobj, &ks->regs_attr); ks8995_probe() 336 sysfs_remove_bin_file(&spi->dev.kobj, &ks->regs_attr); ks8995_remove()
|
/linux-4.4.14/arch/x86/platform/uv/ |
H A D | uv_sysfs.c | 28 static ssize_t partition_id_show(struct kobject *kobj, partition_id_show() argument 34 static ssize_t coherence_id_show(struct kobject *kobj, coherence_id_show() argument
|
/linux-4.4.14/fs/ocfs2/cluster/ |
H A D | sys.c | 38 static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr, version_show() argument 71 ret = sysfs_create_group(&o2cb_kset->kobj, &o2cb_attr_group); o2cb_sys_init()
|
H A D | masklog.c | 168 .kobj = {.ktype = &mlog_ktype}, 181 kobject_set_name(&mlog_kset.kobj, "logmask"); mlog_sys_init() 182 mlog_kset.kobj.kset = o2cb_kset; mlog_sys_init()
|
/linux-4.4.14/arch/powerpc/platforms/pseries/ |
H A D | power.c | 32 static ssize_t auto_poweron_show(struct kobject *kobj, auto_poweron_show() argument 38 static ssize_t auto_poweron_store(struct kobject *kobj, auto_poweron_store() argument
|
/linux-4.4.14/drivers/infiniband/hw/qib/ |
H A D | qib_sysfs.c | 211 static ssize_t read_cc_table_bin(struct file *filp, struct kobject *kobj, read_cc_table_bin() argument 217 container_of(kobj, struct qib_pportdata, pport_cc_kobj); read_cc_table_bin() 241 static void qib_port_release(struct kobject *kobj) qib_port_release() argument 261 static ssize_t read_cc_setting_bin(struct file *filp, struct kobject *kobj, read_cc_setting_bin() argument 267 container_of(kobj, struct qib_pportdata, pport_cc_kobj); read_cc_setting_bin() 296 static ssize_t qib_portattr_show(struct kobject *kobj, qib_portattr_show() argument 302 container_of(kobj, struct qib_pportdata, pport_kobj); qib_portattr_show() 307 static ssize_t qib_portattr_store(struct kobject *kobj, qib_portattr_store() argument 313 container_of(kobj, struct qib_pportdata, pport_kobj); qib_portattr_store() 380 static ssize_t sl2vl_attr_show(struct kobject *kobj, struct attribute *attr, sl2vl_attr_show() argument 386 container_of(kobj, struct qib_pportdata, sl2vl_kobj); sl2vl_attr_show() 452 static ssize_t diagc_attr_show(struct kobject *kobj, struct attribute *attr, diagc_attr_show() argument 458 container_of(kobj, struct qib_pportdata, diagc_kobj); diagc_attr_show() 464 static ssize_t diagc_attr_store(struct kobject *kobj, struct attribute *attr, diagc_attr_store() argument 470 container_of(kobj, struct qib_pportdata, diagc_kobj); diagc_attr_store() 679 struct kobject *kobj) qib_create_port_files() 694 ret = kobject_init_and_add(&ppd->pport_kobj, &qib_port_ktype, kobj, qib_create_port_files() 704 ret = kobject_init_and_add(&ppd->sl2vl_kobj, &qib_sl2vl_ktype, kobj, qib_create_port_files() 714 ret = kobject_init_and_add(&ppd->diagc_kobj, &qib_diagc_ktype, kobj, qib_create_port_files() 728 kobj, "CCMgtA"); qib_create_port_files() 678 qib_create_port_files(struct ib_device *ibdev, u8 port_num, struct kobject *kobj) qib_create_port_files() argument
|
/linux-4.4.14/fs/exofs/ |
H A D | sys.c | 33 static ssize_t odev_attr_show(struct kobject *kobj, struct attribute *attr, odev_attr_show() argument 36 struct exofs_dev *edp = container_of(kobj, struct exofs_dev, ed_kobj); odev_attr_show() 42 static ssize_t odev_attr_store(struct kobject *kobj, struct attribute *attr, odev_attr_store() argument 45 struct exofs_dev *edp = container_of(kobj, struct exofs_dev, ed_kobj); odev_attr_store() 163 &exofs_kset->kobj, "%s_%llx", dt_dev->osdname, pid); exofs_sysfs_sb_add()
|
/linux-4.4.14/drivers/gpu/drm/amd/amdkfd/ |
H A D | kfd_topology.c | 498 static ssize_t sysprops_show(struct kobject *kobj, struct attribute *attr, sysprops_show() argument 530 static ssize_t iolink_show(struct kobject *kobj, struct attribute *attr, iolink_show() argument 565 static ssize_t mem_show(struct kobject *kobj, struct attribute *attr, mem_show() argument 592 static ssize_t kfd_cache_show(struct kobject *kobj, struct attribute *attr, kfd_cache_show() argument 631 static ssize_t node_show(struct kobject *kobj, struct attribute *attr, node_show() argument 753 static void kfd_remove_sysfs_file(struct kobject *kobj, struct attribute *attr) kfd_remove_sysfs_file() argument 755 sysfs_remove_file(kobj, attr); kfd_remove_sysfs_file() 756 kobject_del(kobj); kfd_remove_sysfs_file() 757 kobject_put(kobj); kfd_remove_sysfs_file() 770 if (iolink->kobj) { kfd_remove_sysfs_node_entry() 771 kfd_remove_sysfs_file(iolink->kobj, kfd_remove_sysfs_node_entry() 773 iolink->kobj = NULL; kfd_remove_sysfs_node_entry() 782 if (cache->kobj) { kfd_remove_sysfs_node_entry() 783 kfd_remove_sysfs_file(cache->kobj, kfd_remove_sysfs_node_entry() 785 cache->kobj = NULL; kfd_remove_sysfs_node_entry() 794 if (mem->kobj) { kfd_remove_sysfs_node_entry() 795 kfd_remove_sysfs_file(mem->kobj, &mem->attr); kfd_remove_sysfs_node_entry() 796 mem->kobj = NULL; kfd_remove_sysfs_node_entry() 873 mem->kobj = kzalloc(sizeof(struct kobject), GFP_KERNEL); kfd_build_sysfs_node_entry() 874 if (!mem->kobj) kfd_build_sysfs_node_entry() 876 ret = kobject_init_and_add(mem->kobj, &mem_type, kfd_build_sysfs_node_entry() 884 ret = sysfs_create_file(mem->kobj, &mem->attr); kfd_build_sysfs_node_entry() 892 cache->kobj = kzalloc(sizeof(struct kobject), GFP_KERNEL); kfd_build_sysfs_node_entry() 893 if (!cache->kobj) kfd_build_sysfs_node_entry() 895 ret = kobject_init_and_add(cache->kobj, &cache_type, kfd_build_sysfs_node_entry() 903 ret = sysfs_create_file(cache->kobj, &cache->attr); kfd_build_sysfs_node_entry() 911 iolink->kobj = kzalloc(sizeof(struct kobject), GFP_KERNEL); kfd_build_sysfs_node_entry() 912 if (!iolink->kobj) kfd_build_sysfs_node_entry() 914 ret = kobject_init_and_add(iolink->kobj, &iolink_type, kfd_build_sysfs_node_entry() 922 ret = sysfs_create_file(iolink->kobj, &iolink->attr); kfd_build_sysfs_node_entry() 967 &sysprops_type, &kfd_device->kobj, kfd_topology_update_sysfs()
|
H A D | kfd_topology.h | 90 struct kobject *kobj; member in struct:kfd_mem_properties 113 struct kobject *kobj; member in struct:kfd_cache_properties 131 struct kobject *kobj; member in struct:kfd_iolink_properties
|
/linux-4.4.14/drivers/base/power/ |
H A D | sysfs.c | 680 rc = sysfs_create_group(&dev->kobj, &pm_attr_group); dpm_sysfs_add() 685 rc = sysfs_merge_group(&dev->kobj, &pm_runtime_attr_group); dpm_sysfs_add() 690 rc = sysfs_merge_group(&dev->kobj, &pm_wakeup_attr_group); dpm_sysfs_add() 695 rc = sysfs_merge_group(&dev->kobj, dpm_sysfs_add() 703 sysfs_unmerge_group(&dev->kobj, &pm_wakeup_attr_group); dpm_sysfs_add() 705 sysfs_unmerge_group(&dev->kobj, &pm_runtime_attr_group); dpm_sysfs_add() 707 sysfs_remove_group(&dev->kobj, &pm_attr_group); dpm_sysfs_add() 713 return sysfs_merge_group(&dev->kobj, &pm_wakeup_attr_group); wakeup_sysfs_add() 718 sysfs_unmerge_group(&dev->kobj, &pm_wakeup_attr_group); wakeup_sysfs_remove() 723 return sysfs_merge_group(&dev->kobj, &pm_qos_resume_latency_attr_group); pm_qos_sysfs_add_resume_latency() 728 sysfs_unmerge_group(&dev->kobj, &pm_qos_resume_latency_attr_group); pm_qos_sysfs_remove_resume_latency() 733 return sysfs_merge_group(&dev->kobj, &pm_qos_flags_attr_group); pm_qos_sysfs_add_flags() 738 sysfs_unmerge_group(&dev->kobj, &pm_qos_flags_attr_group); pm_qos_sysfs_remove_flags() 743 return sysfs_merge_group(&dev->kobj, pm_qos_sysfs_add_latency_tolerance() 749 sysfs_unmerge_group(&dev->kobj, &pm_qos_latency_tolerance_attr_group); pm_qos_sysfs_remove_latency_tolerance() 754 sysfs_unmerge_group(&dev->kobj, &pm_runtime_attr_group); rpm_sysfs_remove() 759 sysfs_unmerge_group(&dev->kobj, &pm_qos_latency_tolerance_attr_group); dpm_sysfs_remove() 762 sysfs_unmerge_group(&dev->kobj, &pm_wakeup_attr_group); dpm_sysfs_remove() 763 sysfs_remove_group(&dev->kobj, &pm_attr_group); dpm_sysfs_remove()
|
/linux-4.4.14/kernel/livepatch/ |
H A D | core.c | 599 static ssize_t enabled_store(struct kobject *kobj, struct kobj_attribute *attr, enabled_store() argument 613 patch = container_of(kobj, struct klp_patch, kobj); enabled_store() 642 static ssize_t enabled_show(struct kobject *kobj, enabled_show() argument 647 patch = container_of(kobj, struct klp_patch, kobj); enabled_show() 657 static void klp_kobj_release_patch(struct kobject *kobj) klp_kobj_release_patch() argument 671 static void klp_kobj_release_object(struct kobject *kobj) klp_kobj_release_object() argument 680 static void klp_kobj_release_func(struct kobject *kobj) klp_kobj_release_func() argument 699 kobject_put(&func->kobj); klp_free_funcs_limited() 724 kobject_put(&obj->kobj); klp_free_objects_limited() 733 kobject_put(&patch->kobj); klp_free_patch() 741 return kobject_init_and_add(&func->kobj, &klp_ktype_func, klp_init_func() 742 &obj->kobj, "%s", func->old_name); klp_init_func() 782 ret = kobject_init_and_add(&obj->kobj, &klp_ktype_object, klp_init_object() 783 &patch->kobj, "%s", name); klp_init_object() 803 kobject_put(&obj->kobj); 819 ret = kobject_init_and_add(&patch->kobj, &klp_ktype_patch, klp_init_patch() 838 kobject_put(&patch->kobj);
|
/linux-4.4.14/arch/powerpc/kernel/ |
H A D | cacheinfo.c | 31 struct kobject *kobj; /* bare (not embedded) kobject for cache member in struct:cache_dir 41 struct kobject kobj; member in struct:cache_index_dir 135 return container_of(k, struct cache_index_dir, kobj); kobj_to_cache_index_dir() 482 struct kobject *kobj = NULL; cacheinfo_create_cache_dir() local 489 kobj = kobject_create_and_add("cache", &dev->kobj); cacheinfo_create_cache_dir() 490 if (!kobj) cacheinfo_create_cache_dir() 497 cache_dir->kobj = kobj; cacheinfo_create_cache_dir() 505 kobject_put(kobj); cacheinfo_create_cache_dir() 509 static void cache_index_release(struct kobject *kobj) cache_index_release() argument 513 index = kobj_to_cache_index_dir(kobj); cache_index_release() 707 rc = attr->show(&dir->kobj, attr, buf); cacheinfo_create_index_opt_attrs() 715 if (sysfs_create_file(&dir->kobj, &attr->attr)) cacheinfo_create_index_opt_attrs() 735 rc = kobject_init_and_add(&index_dir->kobj, &cache_index_type, cacheinfo_create_index_dir() 736 cache_dir->kobj, "index%d", index); cacheinfo_create_index_dir() 811 kobject_put(&index->kobj); remove_index_dirs() 821 kobject_del(cache_dir->kobj); remove_cache_dir() 823 kobject_put(cache_dir->kobj); remove_cache_dir()
|
/linux-4.4.14/drivers/power/ |
H A D | ds2780_battery.c | 632 struct kobject *kobj, ds2780_read_param_eeprom_bin() 636 struct device *dev = container_of(kobj, struct device, kobj); ds2780_read_param_eeprom_bin() 645 struct kobject *kobj, ds2780_write_param_eeprom_bin() 649 struct device *dev = container_of(kobj, struct device, kobj); ds2780_write_param_eeprom_bin() 677 struct kobject *kobj, ds2780_read_user_eeprom_bin() 681 struct device *dev = container_of(kobj, struct device, kobj); ds2780_read_user_eeprom_bin() 690 struct kobject *kobj, ds2780_write_user_eeprom_bin() 694 struct device *dev = container_of(kobj, struct device, kobj); ds2780_write_user_eeprom_bin() 775 ret = sysfs_create_group(&dev_info->bat->dev.kobj, &ds2780_attr_group); ds2780_battery_probe() 781 ret = sysfs_create_bin_file(&dev_info->bat->dev.kobj, ds2780_battery_probe() 789 ret = sysfs_create_bin_file(&dev_info->bat->dev.kobj, ds2780_battery_probe() 800 sysfs_remove_bin_file(&dev_info->bat->dev.kobj, ds2780_battery_probe() 803 sysfs_remove_group(&dev_info->bat->dev.kobj, &ds2780_attr_group); ds2780_battery_probe() 818 sysfs_remove_group(&dev_info->bat->dev.kobj, &ds2780_attr_group); ds2780_battery_remove() 631 ds2780_read_param_eeprom_bin(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) ds2780_read_param_eeprom_bin() argument 644 ds2780_write_param_eeprom_bin(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) ds2780_write_param_eeprom_bin() argument 676 ds2780_read_user_eeprom_bin(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) ds2780_read_user_eeprom_bin() argument 689 ds2780_write_user_eeprom_bin(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) ds2780_write_user_eeprom_bin() argument
|
H A D | ds2781_battery.c | 634 struct kobject *kobj, ds2781_read_param_eeprom_bin() 638 struct device *dev = container_of(kobj, struct device, kobj); ds2781_read_param_eeprom_bin() 647 struct kobject *kobj, ds2781_write_param_eeprom_bin() 651 struct device *dev = container_of(kobj, struct device, kobj); ds2781_write_param_eeprom_bin() 679 struct kobject *kobj, ds2781_read_user_eeprom_bin() 683 struct device *dev = container_of(kobj, struct device, kobj); ds2781_read_user_eeprom_bin() 693 struct kobject *kobj, ds2781_write_user_eeprom_bin() 697 struct device *dev = container_of(kobj, struct device, kobj); ds2781_write_user_eeprom_bin() 776 ret = sysfs_create_group(&dev_info->bat->dev.kobj, &ds2781_attr_group); ds2781_battery_probe() 782 ret = sysfs_create_bin_file(&dev_info->bat->dev.kobj, ds2781_battery_probe() 790 ret = sysfs_create_bin_file(&dev_info->bat->dev.kobj, ds2781_battery_probe() 801 sysfs_remove_bin_file(&dev_info->bat->dev.kobj, ds2781_battery_probe() 804 sysfs_remove_group(&dev_info->bat->dev.kobj, &ds2781_attr_group); ds2781_battery_probe() 819 sysfs_remove_group(&dev_info->bat->dev.kobj, &ds2781_attr_group); ds2781_battery_remove() 633 ds2781_read_param_eeprom_bin(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) ds2781_read_param_eeprom_bin() argument 646 ds2781_write_param_eeprom_bin(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) ds2781_write_param_eeprom_bin() argument 678 ds2781_read_user_eeprom_bin(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) ds2781_read_user_eeprom_bin() argument 692 ds2781_write_user_eeprom_bin(struct file *filp, struct kobject *kobj, struct bin_attribute *bin_attr, char *buf, loff_t off, size_t count) ds2781_write_user_eeprom_bin() argument
|
/linux-4.4.14/drivers/acpi/ |
H A D | processor_driver.c | 185 result = sysfs_create_link(&device->dev.kobj, acpi_pss_perf_init() 186 &pr->cdev->device.kobj, acpi_pss_perf_init() 194 result = sysfs_create_link(&pr->cdev->device.kobj, acpi_pss_perf_init() 195 &device->dev.kobj, acpi_pss_perf_init() 206 sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); acpi_pss_perf_init() 217 sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); acpi_pss_perf_exit() 218 sysfs_remove_link(&pr->cdev->device.kobj, "device"); acpi_pss_perf_exit()
|
H A D | device_sysfs.c | 65 #define to_data_node(k) container_of(k, struct acpi_data_node, kobj) 68 static ssize_t acpi_data_node_attr_show(struct kobject *kobj, acpi_data_node_attr_show() argument 71 struct acpi_data_node *dn = to_data_node(kobj); acpi_data_node_attr_show() 81 static void acpi_data_node_release(struct kobject *kobj) acpi_data_node_release() argument 83 struct acpi_data_node *dn = to_data_node(kobj); acpi_data_node_release() 93 static void acpi_expose_nondev_subnodes(struct kobject *kobj, acpi_expose_nondev_subnodes() argument 106 ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype, list_for_each_entry() 107 kobj, "%s", dn->name); list_for_each_entry() 111 acpi_expose_nondev_subnodes(&dn->kobj, &dn->data); list_for_each_entry() 125 kobject_put(&dn->kobj); list_for_each_entry_reverse() 570 acpi_expose_nondev_subnodes(&dev->dev.kobj, &dev->data); acpi_device_setup_files()
|
H A D | glue.c | 234 retval = sysfs_create_link(&acpi_dev->dev.kobj, &dev->kobj, acpi_bind_one() 240 retval = sysfs_create_link(&dev->kobj, &acpi_dev->dev.kobj, acpi_bind_one() 279 sysfs_remove_link(&acpi_dev->dev.kobj, physnode_name); acpi_unbind_one() 280 sysfs_remove_link(&dev->kobj, "firmware_node"); acpi_unbind_one()
|
H A D | fan.c | 362 result = sysfs_create_link(&pdev->dev.kobj, acpi_fan_probe() 363 &cdev->device.kobj, acpi_fan_probe() 368 result = sysfs_create_link(&cdev->device.kobj, acpi_fan_probe() 369 &pdev->dev.kobj, acpi_fan_probe() 382 sysfs_remove_link(&pdev->dev.kobj, "thermal_cooling"); acpi_fan_remove() 383 sysfs_remove_link(&fan->cdev->device.kobj, "device"); acpi_fan_remove()
|
/linux-4.4.14/arch/sh/kernel/cpu/sh4/ |
H A D | sq.c | 269 static ssize_t sq_sysfs_show(struct kobject *kobj, struct attribute *attr, sq_sysfs_show() argument 280 static ssize_t sq_sysfs_store(struct kobject *kobj, struct attribute *attr, sq_sysfs_store() argument 343 struct kobject *kobj; sq_dev_add() local 350 kobj = sq_kobject[cpu]; sq_dev_add() 351 error = kobject_init_and_add(kobj, &ktype_percpu_entry, &dev->kobj, sq_dev_add() 354 kobject_uevent(kobj, KOBJ_ADD); sq_dev_add() 361 struct kobject *kobj = sq_kobject[cpu]; sq_dev_remove() local 363 kobject_put(kobj); sq_dev_remove()
|
/linux-4.4.14/arch/powerpc/sysdev/ |
H A D | mv64x60_pci.c | 28 static ssize_t mv64x60_hs_reg_read(struct file *filp, struct kobject *kobj, mv64x60_hs_reg_read() argument 49 static ssize_t mv64x60_hs_reg_write(struct file *filp, struct kobject *kobj, mv64x60_hs_reg_write() argument 100 return sysfs_create_bin_file(&pdev->dev.kobj, &mv64x60_hs_reg_attr); mv64x60_sysfs_init()
|
/linux-4.4.14/arch/sh/drivers/dma/ |
H A D | dma-sysfs.c | 149 return sysfs_create_link(&info->pdev->dev.kobj, &dev->kobj, name); dma_create_sysfs_files() 164 sysfs_remove_link(&info->pdev->dev.kobj, name); dma_remove_sysfs_files()
|
/linux-4.4.14/drivers/scsi/qla2xxx/ |
H A D | qla_attr.c | 20 qla2x00_sysfs_read_fw_dump(struct file *filp, struct kobject *kobj, qla2x00_sysfs_read_fw_dump() argument 24 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_read_fw_dump() 25 struct device, kobj))); qla2x00_sysfs_read_fw_dump() 53 qla2x00_sysfs_write_fw_dump(struct file *filp, struct kobject *kobj, qla2x00_sysfs_write_fw_dump() argument 57 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_write_fw_dump() 58 struct device, kobj))); qla2x00_sysfs_write_fw_dump() 150 qla2x00_sysfs_read_fw_dump_template(struct file *filp, struct kobject *kobj, qla2x00_sysfs_read_fw_dump_template() argument 154 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_read_fw_dump_template() 155 struct device, kobj))); qla2x00_sysfs_read_fw_dump_template() 168 qla2x00_sysfs_write_fw_dump_template(struct file *filp, struct kobject *kobj, qla2x00_sysfs_write_fw_dump_template() argument 172 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_write_fw_dump_template() 173 struct device, kobj))); qla2x00_sysfs_write_fw_dump_template() 236 qla2x00_sysfs_read_nvram(struct file *filp, struct kobject *kobj, qla2x00_sysfs_read_nvram() argument 240 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_read_nvram() 241 struct device, kobj))); qla2x00_sysfs_read_nvram() 255 qla2x00_sysfs_write_nvram(struct file *filp, struct kobject *kobj, qla2x00_sysfs_write_nvram() argument 259 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_write_nvram() 260 struct device, kobj))); qla2x00_sysfs_write_nvram() 323 qla2x00_sysfs_read_optrom(struct file *filp, struct kobject *kobj, qla2x00_sysfs_read_optrom() argument 327 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_read_optrom() 328 struct device, kobj))); qla2x00_sysfs_read_optrom() 344 qla2x00_sysfs_write_optrom(struct file *filp, struct kobject *kobj, qla2x00_sysfs_write_optrom() argument 348 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_write_optrom() 349 struct device, kobj))); qla2x00_sysfs_write_optrom() 377 qla2x00_sysfs_write_optrom_ctl(struct file *filp, struct kobject *kobj, qla2x00_sysfs_write_optrom_ctl() argument 381 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_write_optrom_ctl() 382 struct device, kobj))); qla2x00_sysfs_write_optrom_ctl() 558 qla2x00_sysfs_read_vpd(struct file *filp, struct kobject *kobj, qla2x00_sysfs_read_vpd() argument 562 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_read_vpd() 563 struct device, kobj))); qla2x00_sysfs_read_vpd() 579 qla2x00_sysfs_write_vpd(struct file *filp, struct kobject *kobj, qla2x00_sysfs_write_vpd() argument 583 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_write_vpd() 584 struct device, kobj))); qla2x00_sysfs_write_vpd() 632 qla2x00_sysfs_read_sfp(struct file *filp, struct kobject *kobj, qla2x00_sysfs_read_sfp() argument 636 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_read_sfp() 637 struct device, kobj))); qla2x00_sysfs_read_sfp() 693 qla2x00_sysfs_write_reset(struct file *filp, struct kobject *kobj, qla2x00_sysfs_write_reset() argument 697 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_write_reset() 698 struct device, kobj))); qla2x00_sysfs_write_reset() 827 qla2x00_sysfs_read_xgmac_stats(struct file *filp, struct kobject *kobj, qla2x00_sysfs_read_xgmac_stats() argument 831 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_read_xgmac_stats() 832 struct device, kobj))); qla2x00_sysfs_read_xgmac_stats() 879 qla2x00_sysfs_read_dcbx_tlv(struct file *filp, struct kobject *kobj, qla2x00_sysfs_read_dcbx_tlv() argument 883 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, qla2x00_sysfs_read_dcbx_tlv() 884 struct device, kobj))); qla2x00_sysfs_read_dcbx_tlv() 962 ret = sysfs_create_bin_file(&host->shost_gendev.kobj, qla2x00_alloc_sysfs_attr() 992 sysfs_remove_bin_file(&host->shost_gendev.kobj, qla2x00_free_sysfs_attr()
|
/linux-4.4.14/fs/nilfs2/ |
H A D | sysfs.c | 45 static ssize_t nilfs_##name##_attr_show(struct kobject *kobj, \ 48 struct the_nilfs *nilfs = container_of(kobj->parent, \ 56 static ssize_t nilfs_##name##_attr_store(struct kobject *kobj, \ 60 struct the_nilfs *nilfs = container_of(kobj->parent, \ 74 static void nilfs_##name##_attr_release(struct kobject *kobj) \ 77 struct the_nilfs *nilfs = container_of(kobj->parent, \ 93 struct kobject *kobj; \ 98 kobj = &subgroups->sg_##name##_kobj; \ 101 kobj->kset = nilfs_kset; \ 103 err = kobject_init_and_add(kobj, &nilfs_##name##_ktype, parent, \ 157 static ssize_t nilfs_snapshot_attr_show(struct kobject *kobj, nilfs_snapshot_attr_show() argument 161 container_of(kobj, struct nilfs_root, snapshot_kobj); nilfs_snapshot_attr_show() 168 static ssize_t nilfs_snapshot_attr_store(struct kobject *kobj, nilfs_snapshot_attr_store() argument 173 container_of(kobj, struct nilfs_root, snapshot_kobj); nilfs_snapshot_attr_store() 180 static void nilfs_snapshot_attr_release(struct kobject *kobj) nilfs_snapshot_attr_release() argument 182 struct nilfs_root *root = container_of(kobj, struct nilfs_root, nilfs_snapshot_attr_release() 952 static ssize_t nilfs_dev_attr_show(struct kobject *kobj, nilfs_dev_attr_show() argument 955 struct the_nilfs *nilfs = container_of(kobj, struct the_nilfs, nilfs_dev_attr_show() 963 static ssize_t nilfs_dev_attr_store(struct kobject *kobj, nilfs_dev_attr_store() argument 967 struct the_nilfs *nilfs = container_of(kobj, struct the_nilfs, nilfs_dev_attr_store() 975 static void nilfs_dev_attr_release(struct kobject *kobj) nilfs_dev_attr_release() argument 977 struct the_nilfs *nilfs = container_of(kobj, struct the_nilfs, nilfs_dev_attr_release() 1072 static ssize_t nilfs_feature_revision_show(struct kobject *kobj, nilfs_feature_revision_show() argument 1084 static ssize_t nilfs_feature_README_show(struct kobject *kobj, nilfs_feature_README_show() argument 1117 err = sysfs_create_group(&nilfs_kset->kobj, &nilfs_feature_attr_group); nilfs_sysfs_init() 1135 sysfs_remove_group(&nilfs_kset->kobj, &nilfs_feature_attr_group); nilfs_sysfs_exit()
|
/linux-4.4.14/drivers/usb/core/ |
H A D | sysfs.c | 324 rc = sysfs_add_file_to_group(&dev->kobj, add_persist_attributes() 333 sysfs_remove_file_from_group(&dev->kobj, remove_persist_attributes() 611 rc = sysfs_merge_group(&dev->kobj, &power_attr_group); add_power_attributes() 613 rc = sysfs_merge_group(&dev->kobj, add_power_attributes() 617 rc = sysfs_merge_group(&dev->kobj, add_power_attributes() 626 sysfs_unmerge_group(&dev->kobj, &usb2_hardware_lpm_attr_group); remove_power_attributes() 627 sysfs_unmerge_group(&dev->kobj, &power_attr_group); remove_power_attributes() 777 static umode_t dev_string_attrs_are_visible(struct kobject *kobj, dev_string_attrs_are_visible() argument 780 struct device *dev = container_of(kobj, struct device, kobj); dev_string_attrs_are_visible() 810 read_descriptors(struct file *filp, struct kobject *kobj, read_descriptors() argument 814 struct device *dev = container_of(kobj, struct device, kobj); read_descriptors() 1041 static umode_t intf_assoc_attrs_are_visible(struct kobject *kobj, intf_assoc_attrs_are_visible() argument 1044 struct device *dev = container_of(kobj, struct device, kobj); intf_assoc_attrs_are_visible()
|
/linux-4.4.14/drivers/staging/rdma/hfi1/ |
H A D | sysfs.c | 64 static ssize_t read_cc_table_bin(struct file *filp, struct kobject *kobj, read_cc_table_bin() argument 70 container_of(kobj, struct hfi1_pportdata, pport_cc_kobj); read_cc_table_bin() 97 static void port_release(struct kobject *kobj) port_release() argument 117 static ssize_t read_cc_setting_bin(struct file *filp, struct kobject *kobj, read_cc_setting_bin() argument 123 container_of(kobj, struct hfi1_pportdata, pport_cc_kobj); read_cc_setting_bin() 236 static ssize_t sc2vl_attr_show(struct kobject *kobj, struct attribute *attr, sc2vl_attr_show() argument 242 container_of(kobj, struct hfi1_pportdata, sc2vl_kobj); sc2vl_attr_show() 342 static ssize_t sl2sc_attr_show(struct kobject *kobj, struct attribute *attr, sl2sc_attr_show() argument 348 container_of(kobj, struct hfi1_pportdata, sl2sc_kobj); sl2sc_attr_show() 416 static ssize_t vl2mtu_attr_show(struct kobject *kobj, struct attribute *attr, vl2mtu_attr_show() argument 422 container_of(kobj, struct hfi1_pportdata, vl2mtu_kobj); vl2mtu_attr_show() 603 struct kobject *kobj) hfi1_create_port_files() 617 ret = kobject_init_and_add(&ppd->sc2vl_kobj, &hfi1_sc2vl_ktype, kobj, hfi1_create_port_files() 627 ret = kobject_init_and_add(&ppd->sl2sc_kobj, &hfi1_sl2sc_ktype, kobj, hfi1_create_port_files() 637 ret = kobject_init_and_add(&ppd->vl2mtu_kobj, &hfi1_vl2mtu_ktype, kobj, hfi1_create_port_files() 649 kobj, "CCMgtA"); hfi1_create_port_files() 602 hfi1_create_port_files(struct ib_device *ibdev, u8 port_num, struct kobject *kobj) hfi1_create_port_files() argument
|
/linux-4.4.14/drivers/net/wireless/ath/ath10k/ |
H A D | thermal.c | 177 ret = sysfs_create_link(&ar->dev->kobj, &cdev->device.kobj, ath10k_thermal_register() 210 sysfs_remove_link(&ar->dev->kobj, "cooling_device"); ath10k_thermal_register() 218 sysfs_remove_link(&ar->dev->kobj, "cooling_device"); ath10k_thermal_unregister()
|
/linux-4.4.14/drivers/staging/speakup/ |
H A D | spk_priv.h | 59 ssize_t spk_var_show(struct kobject *kobj, struct kobj_attribute *attr, 61 ssize_t spk_var_store(struct kobject *kobj, struct kobj_attribute *attr,
|
/linux-4.4.14/drivers/staging/lustre/lustre/ldlm/ |
H A D | ldlm_internal.h | 228 static ssize_t var##_show(struct kobject *kobj, \ 232 struct ldlm_pool *pl = container_of(kobj, struct ldlm_pool, \ 245 static ssize_t var##_store(struct kobject *kobj, \ 250 struct ldlm_pool *pl = container_of(kobj, struct ldlm_pool, \ 269 static ssize_t var##_show(struct kobject *kobj, \ 273 struct ldlm_pool *pl = container_of(kobj, struct ldlm_pool, \ 281 static ssize_t var##_store(struct kobject *kobj, \ 286 struct ldlm_pool *pl = container_of(kobj, struct ldlm_pool, \
|
H A D | ldlm_resource.c | 155 static ssize_t resource_count_show(struct kobject *kobj, struct attribute *attr, resource_count_show() argument 158 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, resource_count_show() 171 static ssize_t lock_count_show(struct kobject *kobj, struct attribute *attr, lock_count_show() argument 174 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, lock_count_show() 184 static ssize_t lock_unused_count_show(struct kobject *kobj, lock_unused_count_show() argument 188 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, lock_unused_count_show() 195 static ssize_t lru_size_show(struct kobject *kobj, struct attribute *attr, lru_size_show() argument 198 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, lru_size_show() 207 static ssize_t lru_size_store(struct kobject *kobj, struct attribute *attr, lru_size_store() argument 210 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, lru_size_store() 292 static ssize_t lru_max_age_show(struct kobject *kobj, struct attribute *attr, lru_max_age_show() argument 295 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, lru_max_age_show() 301 static ssize_t lru_max_age_store(struct kobject *kobj, struct attribute *attr, lru_max_age_store() argument 304 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, lru_max_age_store() 319 static ssize_t early_lock_cancel_show(struct kobject *kobj, early_lock_cancel_show() argument 323 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, early_lock_cancel_show() 329 static ssize_t early_lock_cancel_store(struct kobject *kobj, early_lock_cancel_store() argument 334 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, early_lock_cancel_store() 362 static void ldlm_ns_release(struct kobject *kobj) ldlm_ns_release() argument 364 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, ldlm_ns_release()
|
/linux-4.4.14/drivers/net/wireless/ath/ath5k/ |
H A D | sysfs.c | 107 err = sysfs_create_group(&dev->kobj, &ath5k_attribute_group_ani); ath5k_sysfs_register() 121 sysfs_remove_group(&dev->kobj, &ath5k_attribute_group_ani); ath5k_sysfs_unregister()
|
/linux-4.4.14/arch/x86/include/asm/ |
H A D | amd_nb.h | 37 struct kobject kobj; member in struct:threshold_block 42 struct kobject *kobj; member in struct:threshold_bank
|
/linux-4.4.14/arch/s390/pci/ |
H A D | pci_sysfs.c | 68 static ssize_t util_string_read(struct file *filp, struct kobject *kobj, util_string_read() argument 72 struct device *dev = kobj_to_dev(kobj); util_string_read()
|
/linux-4.4.14/drivers/staging/lustre/lustre/mdc/ |
H A D | lproc_mdc.c | 43 static ssize_t max_rpcs_in_flight_show(struct kobject *kobj, max_rpcs_in_flight_show() argument 48 struct obd_device *dev = container_of(kobj, struct obd_device, max_rpcs_in_flight_show() 59 static ssize_t max_rpcs_in_flight_store(struct kobject *kobj, max_rpcs_in_flight_store() argument 64 struct obd_device *dev = container_of(kobj, struct obd_device, max_rpcs_in_flight_store() 175 static ssize_t max_pages_per_rpc_show(struct kobject *kobj, max_pages_per_rpc_show() argument 179 struct obd_device *dev = container_of(kobj, struct obd_device, max_pages_per_rpc_show()
|
/linux-4.4.14/drivers/rapidio/ |
H A D | rio-sysfs.c | 124 rio_read_config(struct file *filp, struct kobject *kobj, rio_read_config() argument 129 to_rio_dev(container_of(kobj, struct device, kobj)); rio_read_config() 196 rio_write_config(struct file *filp, struct kobject *kobj, rio_write_config() argument 201 to_rio_dev(container_of(kobj, struct device, kobj)); rio_write_config()
|
/linux-4.4.14/drivers/video/backlight/ |
H A D | lm3533_bl.c | 239 static umode_t lm3533_bl_attr_is_visible(struct kobject *kobj, lm3533_bl_attr_is_visible() argument 242 struct device *dev = container_of(kobj, struct device, kobj); lm3533_bl_attr_is_visible() 326 ret = sysfs_create_group(&bd->dev.kobj, &lm3533_bl_attribute_group); lm3533_bl_probe() 345 sysfs_remove_group(&bd->dev.kobj, &lm3533_bl_attribute_group); lm3533_bl_probe() 361 sysfs_remove_group(&bd->dev.kobj, &lm3533_bl_attribute_group); lm3533_bl_remove()
|
/linux-4.4.14/drivers/scsi/esas2r/ |
H A D | esas2r_main.c | 60 static struct esas2r_adapter *esas2r_adapter_from_kobj(struct kobject *kobj) esas2r_adapter_from_kobj() argument 62 struct device *dev = container_of(kobj, struct device, kobj); esas2r_adapter_from_kobj() 68 static ssize_t read_fw(struct file *file, struct kobject *kobj, read_fw() argument 72 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); read_fw() 77 static ssize_t write_fw(struct file *file, struct kobject *kobj, write_fw() argument 81 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); write_fw() 86 static ssize_t read_fs(struct file *file, struct kobject *kobj, read_fs() argument 90 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); read_fs() 95 static ssize_t write_fs(struct file *file, struct kobject *kobj, write_fs() argument 99 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); write_fs() 111 static ssize_t read_vda(struct file *file, struct kobject *kobj, read_vda() argument 115 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); read_vda() 120 static ssize_t write_vda(struct file *file, struct kobject *kobj, write_vda() argument 124 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); write_vda() 129 static ssize_t read_live_nvram(struct file *file, struct kobject *kobj, read_live_nvram() argument 133 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); read_live_nvram() 140 static ssize_t write_live_nvram(struct file *file, struct kobject *kobj, write_live_nvram() argument 144 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); write_live_nvram() 160 static ssize_t read_default_nvram(struct file *file, struct kobject *kobj, read_default_nvram() argument 164 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); read_default_nvram() 171 static ssize_t read_hw(struct file *file, struct kobject *kobj, read_hw() argument 175 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); read_hw() 189 static ssize_t write_hw(struct file *file, struct kobject *kobj, write_hw() argument 193 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); write_hw() 479 if (sysfs_create_bin_file(&host->shost_dev.kobj, &bin_attr_fw)) esas2r_probe() 485 if (sysfs_create_bin_file(&host->shost_dev.kobj, &bin_attr_fs)) esas2r_probe() 491 if (sysfs_create_bin_file(&host->shost_dev.kobj, &bin_attr_vda)) esas2r_probe() 497 if (sysfs_create_bin_file(&host->shost_dev.kobj, &bin_attr_hw)) esas2r_probe() 503 if (sysfs_create_bin_file(&host->shost_dev.kobj, &bin_attr_live_nvram)) esas2r_probe() 509 if (sysfs_create_bin_file(&host->shost_dev.kobj, esas2r_probe()
|
/linux-4.4.14/drivers/gpu/drm/ |
H A D | drm_sysfs.c | 251 static ssize_t edid_show(struct file *filp, struct kobject *kobj, edid_show() argument 255 struct device *connector_dev = container_of(kobj, struct device, kobj); edid_show() 422 static int kobj_connector_type(struct kobject *kobj) kobj_connector_type() argument 424 struct device *dev = kobj_to_dev(kobj); kobj_connector_type() 430 static umode_t connector_is_dvii(struct kobject *kobj, connector_is_dvii() argument 433 return kobj_connector_type(kobj) == DRM_MODE_CONNECTOR_DVII ? connector_is_dvii() 437 static umode_t connector_is_tv(struct kobject *kobj, connector_is_tv() argument 440 switch (kobj_connector_type(kobj)) { connector_is_tv() 559 kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp); drm_sysfs_hotplug_event()
|
/linux-4.4.14/drivers/s390/cio/ |
H A D | ccwgroup.c | 42 sysfs_remove_link(&gdev->dev.kobj, str); __ccwgroup_remove_symlinks() 43 sysfs_remove_link(&gdev->cdev[i]->dev.kobj, "group_device"); __ccwgroup_remove_symlinks() 245 rc = sysfs_create_link(&gdev->cdev[i]->dev.kobj, __ccwgroup_create_symlinks() 246 &gdev->dev.kobj, "group_device"); __ccwgroup_create_symlinks() 249 sysfs_remove_link(&gdev->cdev[i]->dev.kobj, __ccwgroup_create_symlinks() 256 rc = sysfs_create_link(&gdev->dev.kobj, __ccwgroup_create_symlinks() 257 &gdev->cdev[i]->dev.kobj, str); __ccwgroup_create_symlinks() 261 sysfs_remove_link(&gdev->dev.kobj, str); __ccwgroup_create_symlinks() 264 sysfs_remove_link(&gdev->cdev[i]->dev.kobj, __ccwgroup_create_symlinks()
|
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/ |
H A D | lprocfs_status.c | 360 static ssize_t uuid_show(struct kobject *kobj, struct attribute *attr, uuid_show() argument 363 struct obd_device *obd = container_of(kobj, struct obd_device, uuid_show() 370 static ssize_t blocksize_show(struct kobject *kobj, struct attribute *attr, blocksize_show() argument 373 struct obd_device *obd = container_of(kobj, struct obd_device, blocksize_show() 386 static ssize_t kbytestotal_show(struct kobject *kobj, struct attribute *attr, kbytestotal_show() argument 389 struct obd_device *obd = container_of(kobj, struct obd_device, kbytestotal_show() 409 static ssize_t kbytesfree_show(struct kobject *kobj, struct attribute *attr, kbytesfree_show() argument 412 struct obd_device *obd = container_of(kobj, struct obd_device, kbytesfree_show() 432 static ssize_t kbytesavail_show(struct kobject *kobj, struct attribute *attr, kbytesavail_show() argument 435 struct obd_device *obd = container_of(kobj, struct obd_device, kbytesavail_show() 455 static ssize_t filestotal_show(struct kobject *kobj, struct attribute *attr, filestotal_show() argument 458 struct obd_device *obd = container_of(kobj, struct obd_device, filestotal_show() 471 static ssize_t filesfree_show(struct kobject *kobj, struct attribute *attr, filesfree_show() argument 474 struct obd_device *obd = container_of(kobj, struct obd_device, filesfree_show() 895 static void obd_sysfs_release(struct kobject *kobj) obd_sysfs_release() argument 897 struct obd_device *obd = container_of(kobj, struct obd_device, obd_sysfs_release() 1500 static ssize_t lustre_attr_show(struct kobject *kobj, lustre_attr_show() argument 1505 return a->show ? a->show(kobj, attr, buf) : 0; lustre_attr_show() 1508 static ssize_t lustre_attr_store(struct kobject *kobj, struct attribute *attr, lustre_attr_store() argument 1513 return a->store ? a->store(kobj, attr, buf, len) : len; lustre_attr_store()
|
/linux-4.4.14/drivers/char/tpm/ |
H A D | tpm-chip.c | 137 chip->cdev.kobj.parent = &chip->dev.kobj; tpmm_chip_alloc() 239 rc = __compat_only_sysfs_link_entry_to_kobj(&chip->pdev->kobj, tpm_chip_register() 240 &chip->dev.kobj, tpm_chip_register() 276 sysfs_remove_link(&chip->pdev->kobj, "ppi"); tpm_chip_unregister()
|
/linux-4.4.14/drivers/regulator/ |
H A D | userspace-consumer.c | 137 ret = sysfs_create_group(&pdev->dev.kobj, &attr_group); regulator_userspace_consumer_probe() 157 sysfs_remove_group(&pdev->dev.kobj, &attr_group); regulator_userspace_consumer_probe() 166 sysfs_remove_group(&pdev->dev.kobj, &attr_group); regulator_userspace_consumer_remove()
|
/linux-4.4.14/drivers/net/wireless/ti/wlcore/ |
H A D | sysfs.c | 109 static ssize_t wl1271_sysfs_read_fwlog(struct file *filp, struct kobject *kobj, wl1271_sysfs_read_fwlog() argument 113 struct device *dev = container_of(kobj, struct device, kobj); wl1271_sysfs_read_fwlog()
|
/linux-4.4.14/arch/arm/mach-netx/ |
H A D | xc.c | 196 (NETX_PA_XPEC(xcno), XPEC_MEM_SIZE, kobject_name(&dev->kobj))) request_xc() 200 (NETX_PA_XMAC(xcno), XMAC_MEM_SIZE, kobject_name(&dev->kobj))) request_xc() 204 (SRAM_INTERNAL_PHYS(xcno), SRAM_MEM_SIZE, kobject_name(&dev->kobj))) request_xc()
|
/linux-4.4.14/drivers/usb/wusbcore/ |
H A D | dev-sysfs.c | 125 int result = sysfs_create_group(&usb_dev->dev.kobj, wusb_dev_sysfs_add() 138 sysfs_remove_group(&usb_dev->dev.kobj, &wusb_dev_attr_group); wusb_dev_sysfs_rm()
|
/linux-4.4.14/drivers/devfreq/ |
H A D | governor_userspace.c | 108 err = sysfs_create_group(&devfreq->dev.kobj, &dev_attr_group); userspace_init() 115 sysfs_remove_group(&devfreq->dev.kobj, &dev_attr_group); userspace_exit()
|