Home
last modified time | relevance | path

Searched refs:kobj (Results 1 – 25 of 648) sorted by relevance

12345678910>>...26

/linux/include/linux/
H A Dsysfs.h170 struct kobject *kobj, struct attribute *attr, int n) \
172 if (n == 0 && !name##_group_visible(kobj)) \
174 return name##_attr_visible(kobj, attr, n); \
202 struct kobject *kobj, struct attribute *a, int n) \
204 if (n == 0 && !name##_group_visible(kobj)) \
217 struct kobject *kobj, const struct bin_attribute *attr, int n) \
219 if (n == 0 && !name##_group_visible(kobj)) \
221 return name##_attr_visible(kobj, attr, n); \
226 struct kobject *kobj, const struct bin_attribute *a, int n) \
228 if (n == 0 && !name##_group_visible(kobj)) \
[all …]
/linux/drivers/gpu/drm/xe/
H A Dxe_hw_engine_class_sysfs.c35 static void xe_hw_engine_sysfs_kobj_release(struct kobject *kobj) in xe_hw_engine_sysfs_kobj_release() argument
37 kfree(kobj); in xe_hw_engine_sysfs_kobj_release()
40 static ssize_t xe_hw_engine_class_sysfs_attr_show(struct kobject *kobj, in xe_hw_engine_class_sysfs_attr_show() argument
44 struct xe_device *xe = kobj_to_xe(kobj); in xe_hw_engine_class_sysfs_attr_show()
50 return kattr->show(kobj, kattr, buf); in xe_hw_engine_class_sysfs_attr_show()
56 static ssize_t xe_hw_engine_class_sysfs_attr_store(struct kobject *kobj, in xe_hw_engine_class_sysfs_attr_store() argument
61 struct xe_device *xe = kobj_to_xe(kobj); in xe_hw_engine_class_sysfs_attr_store()
67 return kattr->store(kobj, kattr, buf, count); in xe_hw_engine_class_sysfs_attr_store()
88 static ssize_t job_timeout_max_store(struct kobject *kobj, in job_timeout_max_store() argument
92 struct xe_hw_engine_class_intf *eclass = kobj_to_eclass(kobj); in job_timeout_max_store()
[all …]
H A Dxe_gt_freq.c57 return &kobj_to_gt(dev->kobj.parent)->uc.guc.pc; in dev_to_pc()
63 return gt_to_xe(kobj_to_gt(dev->kobj.parent)); in dev_to_xe()
66 static ssize_t act_freq_show(struct kobject *kobj, in act_freq_show() argument
69 struct device *dev = kobj_to_dev(kobj); in act_freq_show()
80 static ssize_t cur_freq_show(struct kobject *kobj, in cur_freq_show() argument
83 struct device *dev = kobj_to_dev(kobj); in cur_freq_show()
97 static ssize_t rp0_freq_show(struct kobject *kobj, in rp0_freq_show() argument
100 struct device *dev = kobj_to_dev(kobj); in rp0_freq_show()
107 static ssize_t rpe_freq_show(struct kobject *kobj, in rpe_freq_show() argument
110 struct device *dev = kobj_to_dev(kobj); in rpe_freq_show()
[all …]
/linux/fs/sysfs/
H A Dgroup.c34 static umode_t __first_visible(const struct attribute_group *grp, struct kobject *kobj) in __first_visible() argument
37 return grp->is_visible(kobj, grp->attrs[0], 0); in __first_visible()
40 return grp->is_visible_const(kobj, grp->attrs[0], 0); in __first_visible()
43 return grp->is_bin_visible(kobj, grp->bin_attrs[0], 0); in __first_visible()
48 static int create_files(struct kernfs_node *parent, struct kobject *kobj, in create_files() argument
69 mode = grp->is_visible(kobj, *attr, i); in create_files()
71 mode = grp->is_visible_const(kobj, *attr, i); in create_files()
102 mode = grp->is_bin_visible(kobj, *bin_attr, i); in create_files()
108 size = grp->bin_size(kobj, *bin_attr, i); in create_files()
129 static int internal_create_group(struct kobject *kobj, int update, in internal_create_group() argument
[all …]
H A Ddir.c40 int sysfs_create_dir_ns(struct kobject *kobj, const struct ns_common *ns) in sysfs_create_dir_ns() argument
46 if (WARN_ON(!kobj)) in sysfs_create_dir_ns()
49 if (kobj->parent) in sysfs_create_dir_ns()
50 parent = kobj->parent->sd; in sysfs_create_dir_ns()
57 kobject_get_ownership(kobj, &uid, &gid); in sysfs_create_dir_ns()
59 kn = kernfs_create_dir_ns(parent, kobject_name(kobj), 0755, uid, gid, in sysfs_create_dir_ns()
60 kobj, ns); in sysfs_create_dir_ns()
63 sysfs_warn_dup(parent, kobject_name(kobj)); in sysfs_create_dir_ns()
67 kobj->sd = kn; in sysfs_create_dir_ns()
79 void sysfs_remove_dir(struct kobject *kobj) in sysfs_remove_dir() argument
[all …]
H A Dsymlink.c67 static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target, in sysfs_do_create_link() argument
72 if (!kobj) in sysfs_do_create_link()
75 parent = kobj->sd; in sysfs_do_create_link()
89 int sysfs_create_link(struct kobject *kobj, struct kobject *target, in sysfs_create_link() argument
92 return sysfs_do_create_link(kobj, target, name, 1); in sysfs_create_link()
105 int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, in sysfs_create_link_nowarn() argument
108 return sysfs_do_create_link(kobj, target, name, 0); in sysfs_create_link_nowarn()
121 void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, in sysfs_delete_link() argument
132 if (targ->sd && kernfs_ns_enabled(kobj->sd)) in sysfs_delete_link()
135 kernfs_remove_by_name_ns(kobj->sd, name, ns); in sysfs_delete_link()
[all …]
/linux/fs/nfs/
H A Dsysfs.c25 static void nfs_kset_release(struct kobject *kobj) in nfs_kset_release() argument
27 struct kset *kset = container_of(kobj, struct kset, kobj); in nfs_kset_release()
32 const struct kobject *kobj) in nfs_netns_object_child_ns_type() argument
51 ret = kobject_set_name(&nfs_kset->kobj, "nfs"); in nfs_sysfs_init()
57 nfs_kset->kobj.parent = fs_kobj; in nfs_sysfs_init()
58 nfs_kset->kobj.ktype = &nfs_kset_type; in nfs_sysfs_init()
59 nfs_kset->kobj.kset = NULL; in nfs_sysfs_init()
75 static ssize_t nfs_netns_identifier_show(struct kobject *kobj, in nfs_netns_identifier_show() argument
78 struct nfs_netns_client *c = container_of(kobj, in nfs_netns_identifier_show()
97 static ssize_t nfs_netns_identifier_store(struct kobject *kobj, in nfs_netns_identifier_store() argument
[all …]
/linux/drivers/gpu/drm/i915/gt/
H A Dsysfs_engines.c20 static struct intel_engine_cs *kobj_to_engine(struct kobject *kobj) in kobj_to_engine() argument
22 return container_of(kobj, struct kobj_engine, base)->engine; in kobj_to_engine()
26 name_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in name_show() argument
28 return sysfs_emit(buf, "%s\n", kobj_to_engine(kobj)->name); in name_show()
35 class_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in class_show() argument
37 return sysfs_emit(buf, "%d\n", kobj_to_engine(kobj)->uabi_class); in class_show()
44 inst_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in inst_show() argument
46 return sysfs_emit(buf, "%d\n", kobj_to_engine(kobj)->uabi_instance); in inst_show()
53 mmio_show(struct kobject *kobj, struct kobj_attribute *attr, char *buf) in mmio_show() argument
55 return sysfs_emit(buf, "0x%x\n", kobj_to_engine(kobj)->mmio_base); in mmio_show()
[all …]
/linux/drivers/edac/
H A Dedac_device_sysfs.c23 #define to_edacdev(k) container_of(k, struct edac_device_ctl_info, kobj)
116 #define to_ctl_info(k) container_of(k, struct edac_device_ctl_info, kobj)
120 static ssize_t edac_dev_ctl_info_show(struct kobject *kobj, in edac_dev_ctl_info_show() argument
123 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); in edac_dev_ctl_info_show()
132 static ssize_t edac_dev_ctl_info_store(struct kobject *kobj, in edac_dev_ctl_info_store() argument
136 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); in edac_dev_ctl_info_store()
205 static void edac_device_ctrl_master_release(struct kobject *kobj) in edac_device_ctrl_master_release() argument
207 struct edac_device_ctl_info *edac_dev = to_edacdev(kobj); in edac_device_ctrl_master_release()
247 memset(&edac_dev->kobj, 0, sizeof(struct kobject)); in edac_device_register_sysfs_main_kobj()
260 err = kobject_init_and_add(&edac_dev->kobj, &ktype_device_ctrl, in edac_device_register_sysfs_main_kobj()
[all …]
/linux/drivers/cpuidle/
H A Dsysfs.c131 retval = sysfs_create_group(&dev_root->kobj, &cpuidle_attr_group); in cpuidle_add_interface()
142 sysfs_remove_group(&dev->kobj, &cpuidle_attr_group); in cpuidle_remove_interface()
156 struct kobject kobj; member
159 static inline struct cpuidle_device *to_cpuidle_device(struct kobject *kobj) in to_cpuidle_device() argument
162 container_of(kobj, struct cpuidle_device_kobj, kobj); in to_cpuidle_device()
167 static ssize_t cpuidle_show(struct kobject *kobj, struct attribute *attr, in cpuidle_show() argument
171 struct cpuidle_device *dev = to_cpuidle_device(kobj); in cpuidle_show()
182 static ssize_t cpuidle_store(struct kobject *kobj, struct attribute *attr, in cpuidle_store() argument
186 struct cpuidle_device *dev = to_cpuidle_device(kobj); in cpuidle_store()
202 static void cpuidle_sysfs_release(struct kobject *kobj) in cpuidle_sysfs_release() argument
[all …]
/linux/drivers/block/rnbd/
H A Drnbd-srv-sysfs.c27 static void rnbd_srv_dev_release(struct kobject *kobj) in rnbd_srv_dev_release() argument
31 dev = container_of(kobj, struct rnbd_srv_dev, dev_kobj); in rnbd_srv_dev_release()
61 bdev_kobj = &disk_to_dev(bdev->bd_disk)->kobj; in rnbd_srv_create_dev_sysfs()
85 static ssize_t read_only_show(struct kobject *kobj, struct kobj_attribute *attr, in read_only_show() argument
90 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in read_only_show()
98 static ssize_t access_mode_show(struct kobject *kobj, in access_mode_show() argument
104 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in access_mode_show()
113 static ssize_t mapping_path_show(struct kobject *kobj, in mapping_path_show() argument
118 sess_dev = container_of(kobj, struct rnbd_srv_sess_dev, kobj); in mapping_path_show()
126 static ssize_t rnbd_srv_dev_session_force_close_show(struct kobject *kobj, in rnbd_srv_dev_session_force_close_show() argument
[all …]
H A Drnbd-clt-sysfs.c225 static ssize_t state_show(struct kobject *kobj, in state_show() argument
230 dev = container_of(kobj, struct rnbd_clt_dev, kobj); in state_show()
250 static ssize_t nr_poll_queues_show(struct kobject *kobj, in nr_poll_queues_show() argument
255 dev = container_of(kobj, struct rnbd_clt_dev, kobj); in nr_poll_queues_show()
263 static ssize_t mapping_path_show(struct kobject *kobj, in mapping_path_show() argument
268 dev = container_of(kobj, struct rnbd_clt_dev, kobj); in mapping_path_show()
276 static ssize_t access_mode_show(struct kobject *kobj, in access_mode_show() argument
281 dev = container_of(kobj, struct rnbd_clt_dev, kobj); in access_mode_show()
289 static ssize_t rnbd_clt_unmap_dev_show(struct kobject *kobj, in rnbd_clt_unmap_dev_show() argument
296 static ssize_t rnbd_clt_unmap_dev_store(struct kobject *kobj, in rnbd_clt_unmap_dev_store() argument
[all …]
/linux/fs/btrfs/
H A Dsysfs.c58 struct kobject kobj; member
101 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj);
102 static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj);
103 static struct kobject *get_btrfs_kobj(struct kobject *kobj);
175 static ssize_t btrfs_feature_attr_show(struct kobject *kobj, in btrfs_feature_attr_show() argument
179 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show()
191 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, in btrfs_feature_attr_store() argument
201 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store()
259 static umode_t btrfs_feature_visible(struct kobject *kobj, in btrfs_feature_visible() argument
262 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_visible()
[all …]
/linux/arch/powerpc/kernel/
H A Dsecvar-sysfs.c22 static ssize_t format_show(struct kobject *kobj, struct kobj_attribute *attr, in format_show() argument
39 static ssize_t size_show(struct kobject *kobj, struct kobj_attribute *attr, in size_show() argument
45 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in size_show()
48 pr_err("Error retrieving %s variable size %d\n", kobj->name, rc); in size_show()
55 static ssize_t data_read(struct file *filep, struct kobject *kobj, in data_read() argument
63 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, NULL, &dsize); in data_read()
66 pr_err("Error getting %s variable size %d\n", kobj->name, rc); in data_read()
75 rc = secvar_ops->get(kobj->name, strlen(kobj->name) + 1, data, &dsize); in data_read()
77 pr_err("Error getting %s variable %d\n", kobj->name, rc); in data_read()
88 static ssize_t update_write(struct file *filep, struct kobject *kobj, in update_write() argument
[all …]
/linux/drivers/infiniband/ulp/rtrs/
H A Drtrs-srv-sysfs.c16 static void rtrs_srv_release(struct kobject *kobj) in rtrs_srv_release() argument
20 srv_path = container_of(kobj, struct rtrs_srv_path, kobj); in rtrs_srv_release()
29 static ssize_t rtrs_srv_disconnect_show(struct kobject *kobj, in rtrs_srv_disconnect_show() argument
35 static ssize_t rtrs_srv_disconnect_store(struct kobject *kobj, in rtrs_srv_disconnect_store() argument
43 srv_path = container_of(kobj, struct rtrs_srv_path, kobj); in rtrs_srv_disconnect_store()
56 sysfs_remove_file_self(&srv_path->kobj, &attr->attr); in rtrs_srv_disconnect_store()
66 static ssize_t rtrs_srv_hca_port_show(struct kobject *kobj, in rtrs_srv_hca_port_show() argument
73 srv_path = container_of(kobj, typeof(*srv_path), kobj); in rtrs_srv_hca_port_show()
82 static ssize_t rtrs_srv_hca_name_show(struct kobject *kobj, in rtrs_srv_hca_name_show() argument
88 srv_path = container_of(kobj, struct rtrs_srv_path, kobj); in rtrs_srv_hca_name_show()
[all …]
/linux/mm/
H A Dhugetlb_sysfs.c26 static struct hstate *kobj_to_node_hstate(struct kobject *kobj, int *nidp);
28 static struct hstate *kobj_to_hstate(struct kobject *kobj, int *nidp) in kobj_to_hstate() argument
33 if (hstate_kobjs[i] == kobj) { in kobj_to_hstate()
39 return kobj_to_node_hstate(kobj, nidp); in kobj_to_hstate()
42 static ssize_t nr_hugepages_show_common(struct kobject *kobj, in nr_hugepages_show_common() argument
49 h = kobj_to_hstate(kobj, &nid); in nr_hugepages_show_common()
59 struct kobject *kobj, const char *buf, in nr_hugepages_store_common() argument
71 h = kobj_to_hstate(kobj, &nid); in nr_hugepages_store_common()
75 static ssize_t nr_hugepages_show(struct kobject *kobj, in nr_hugepages_show() argument
78 return nr_hugepages_show_common(kobj, attr, buf); in nr_hugepages_show()
[all …]
/linux/net/sunrpc/
H A Dsysfs.c29 static void rpc_sysfs_object_release(struct kobject *kobj) in rpc_sysfs_object_release() argument
31 kfree(kobj); in rpc_sysfs_object_release()
35 rpc_sysfs_object_child_ns_type(const struct kobject *kobj) in rpc_sysfs_object_child_ns_type() argument
50 struct kobject *kobj; in rpc_sysfs_object_alloc() local
52 kobj = kzalloc_obj(*kobj); in rpc_sysfs_object_alloc()
53 if (kobj) { in rpc_sysfs_object_alloc()
54 kobj->kset = kset; in rpc_sysfs_object_alloc()
55 if (kobject_init_and_add(kobj, &rpc_sysfs_object_type, in rpc_sysfs_object_alloc()
57 return kobj; in rpc_sysfs_object_alloc()
64 rpc_sysfs_client_kobj_get_clnt(struct kobject * kobj) rpc_sysfs_client_kobj_get_clnt() argument
74 rpc_sysfs_xprt_kobj_get_xprt(struct kobject * kobj) rpc_sysfs_xprt_kobj_get_xprt() argument
83 rpc_sysfs_xprt_kobj_get_xprt_switch(struct kobject * kobj) rpc_sysfs_xprt_kobj_get_xprt_switch() argument
92 rpc_sysfs_xprt_switch_kobj_get_xprt(struct kobject * kobj) rpc_sysfs_xprt_switch_kobj_get_xprt() argument
100 rpc_sysfs_clnt_version_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_clnt_version_show() argument
115 rpc_sysfs_clnt_program_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_clnt_program_show() argument
130 rpc_sysfs_clnt_max_connect_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_clnt_max_connect_show() argument
145 rpc_sysfs_xprt_dstaddr_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_xprt_dstaddr_show() argument
162 rpc_sysfs_xprt_srcaddr_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_xprt_srcaddr_show() argument
194 rpc_sysfs_xprt_xprtsec_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_xprt_xprtsec_show() argument
213 rpc_sysfs_xprt_info_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_xprt_info_show() argument
246 rpc_sysfs_xprt_state_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_xprt_state_show() argument
290 rpc_sysfs_xprt_del_xprt_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_xprt_del_xprt_show() argument
298 rpc_sysfs_xprt_switch_info_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_xprt_switch_info_show() argument
317 rpc_sysfs_xprt_switch_add_xprt_show(struct kobject * kobj,struct kobj_attribute * attr,char * buf) rpc_sysfs_xprt_switch_add_xprt_show() argument
324 rpc_sysfs_xprt_switch_add_xprt_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) rpc_sysfs_xprt_switch_add_xprt_store() argument
366 rpc_sysfs_xprt_dstaddr_store(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) rpc_sysfs_xprt_dstaddr_store() argument
425 rpc_sysfs_xprt_state_change(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) rpc_sysfs_xprt_state_change() argument
476 rpc_sysfs_xprt_del_xprt(struct kobject * kobj,struct kobj_attribute * attr,const char * buf,size_t count) rpc_sysfs_xprt_del_xprt() argument
533 rpc_sysfs_client_release(struct kobject * kobj) rpc_sysfs_client_release() argument
541 rpc_sysfs_xprt_switch_release(struct kobject * kobj) rpc_sysfs_xprt_switch_release() argument
549 rpc_sysfs_xprt_release(struct kobject * kobj) rpc_sysfs_xprt_release() argument
557 rpc_sysfs_client_namespace(const struct kobject * kobj) rpc_sysfs_client_namespace() argument
563 rpc_sysfs_xprt_switch_namespace(const struct kobject * kobj) rpc_sysfs_xprt_switch_namespace() argument
569 rpc_sysfs_xprt_namespace(const struct kobject * kobj) rpc_sysfs_xprt_namespace() argument
[all...]
/linux/mm/damon/
H A Dsysfs-common.c24 range->kobj = (struct kobject){}; in damon_sysfs_ul_range_alloc()
31 static ssize_t min_show(struct kobject *kobj, struct kobj_attribute *attr, in min_show() argument
34 struct damon_sysfs_ul_range *range = container_of(kobj, in min_show()
35 struct damon_sysfs_ul_range, kobj); in min_show()
40 static ssize_t min_store(struct kobject *kobj, struct kobj_attribute *attr, in min_store() argument
43 struct damon_sysfs_ul_range *range = container_of(kobj, in min_store()
44 struct damon_sysfs_ul_range, kobj); in min_store()
56 static ssize_t max_show(struct kobject *kobj, struct kobj_attribute *attr, in max_show() argument
59 struct damon_sysfs_ul_range *range = container_of(kobj, in max_show()
60 struct damon_sysfs_ul_range, kobj); in max_show()
[all …]
/linux/Documentation/translations/zh_CN/core-api/
H A Dkobject.rst67 struct kobject kobj;
71 如果你有一个uio_map结构体,找到其嵌入的kobject只是一个使用kobj成员的问题。
89 struct uio_map *u_map = container_of(kp, struct uio_map, kobj);
95 struct kobject kobj;
99 #define to_map(map) container_of(map, struct uio_map, kobj)
103 struct uio_map *map = to_map(kobj);
112 void kobject_init(struct kobject *kobj, struct kobj_type *ktype);
117 int kobject_add(struct kobject *kobj, struct kobject *parent,
121 联,在调用kobject_add()之前必须分配kobj->kset。如果kset与kobject相关联,则
128 int kobject_rename(struct kobject *kobj, const char *new_name);
[all …]
/linux/drivers/w1/slaves/
H A Dw1_ds2408.c67 static ssize_t state_read(struct file *filp, struct kobject *kobj, in state_read() argument
71 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in state_read()
73 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in state_read()
76 return _read_reg(kobj_to_w1_slave(kobj), W1_F29_REG_LOGIG_STATE, buf); in state_read()
79 static ssize_t output_read(struct file *filp, struct kobject *kobj, in output_read() argument
83 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in output_read()
85 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in output_read()
88 return _read_reg(kobj_to_w1_slave(kobj), in output_read()
92 static ssize_t activity_read(struct file *filp, struct kobject *kobj, in activity_read() argument
96 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in activity_read()
[all …]
/linux/lib/
H A Dkobject_uevent.c191 int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count) in kobject_synth_uevent() argument
207 r = kobject_uevent_env(kobj, action, no_uuid_envp); in kobject_synth_uevent()
221 r = kobject_uevent_env(kobj, action, env->envp); in kobject_synth_uevent()
225 devpath = kobject_get_path(kobj, GFP_KERNEL); in kobject_synth_uevent()
235 static int kobj_usermode_filter(struct kobject *kobj) in kobj_usermode_filter() argument
239 ops = kobj_ns_ops(kobj); in kobj_usermode_filter()
243 ns = kobj->ktype->namespace(kobj); in kobj_usermode_filter()
382 static int kobject_uevent_net_broadcast(struct kobject *kobj, in kobject_uevent_net_broadcast() argument
393 ops = kobj_ns_ops(kobj); in kobject_uevent_net_broadcast()
394 if (!ops && kobj->kset) { in kobject_uevent_net_broadcast()
[all …]
/linux/drivers/platform/x86/lenovo/
H A Dthink-lmi.c237 static inline struct tlmi_pwd_setting *to_tlmi_pwd_setting(struct kobject *kobj) in to_tlmi_pwd_setting() argument
239 return container_of(kobj, struct tlmi_pwd_setting, kobj); in to_tlmi_pwd_setting()
242 static inline struct tlmi_attr_setting *to_tlmi_attr_setting(struct kobject *kobj) in to_tlmi_attr_setting() argument
244 return container_of(kobj, struct tlmi_attr_setting, kobj); in to_tlmi_attr_setting()
424 static ssize_t is_enabled_show(struct kobject *kobj, struct kobj_attribute *attr, in is_enabled_show() argument
427 struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj); in is_enabled_show()
434 static ssize_t current_password_store(struct kobject *kobj, in current_password_store() argument
438 struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj); in current_password_store()
453 static ssize_t new_password_store(struct kobject *kobj, in new_password_store() argument
457 struct tlmi_pwd_setting *setting = to_tlmi_pwd_setting(kobj); in new_password_store()
[all …]
/linux/fs/xfs/
H A Dxfs_sysfs.h23 struct xfs_kobj *kobj = to_kobj(kobject); in xfs_sysfs_release() local
24 complete(&kobj->complete); in xfs_sysfs_release()
29 struct xfs_kobj *kobj, in xfs_sysfs_init() argument
38 init_completion(&kobj->complete); in xfs_sysfs_init()
39 err = kobject_init_and_add(&kobj->kobject, ktype, parent, "%s", name); in xfs_sysfs_init()
41 kobject_put(&kobj->kobject); in xfs_sysfs_init()
48 struct xfs_kobj *kobj) in xfs_sysfs_del() argument
50 kobject_del(&kobj->kobject); in xfs_sysfs_del()
51 kobject_put(&kobj->kobject); in xfs_sysfs_del()
52 wait_for_completion(&kobj->complete); in xfs_sysfs_del()
/linux/fs/ubifs/
H A Dsysfs.c47 static ssize_t ubifs_attr_show(struct kobject *kobj, in ubifs_attr_show() argument
50 struct ubifs_info *sbi = container_of(kobj, struct ubifs_info, in ubifs_attr_show()
51 kobj); in ubifs_attr_show()
66 static void ubifs_sb_release(struct kobject *kobj) in ubifs_sb_release() argument
68 struct ubifs_info *c = container_of(kobj, struct ubifs_info, kobj); in ubifs_sb_release()
88 .kobj = {.ktype = &ubifs_ktype},
110 c->kobj.kset = &ubifs_kset; in ubifs_sysfs_register()
113 ret = kobject_init_and_add(&c->kobj, &ubifs_sb_ktype, NULL, in ubifs_sysfs_register()
121 kobject_put(&c->kobj); in ubifs_sysfs_register()
133 kobject_del(&c->kobj); in ubifs_sysfs_unregister()
[all …]
/linux/fs/
H A Dchar_dev.c283 kobject_set_name(&cdev->kobj, "%s", name); in __register_chrdev()
293 kobject_put(&cdev->kobj); in __register_chrdev()
348 struct kobject *kobj; in cdev_get() local
352 kobj = kobject_get_unless_zero(&p->kobj); in cdev_get()
353 if (!kobj) in cdev_get()
355 return kobj; in cdev_get()
362 kobject_put(&p->kobj); in cdev_put()
380 struct kobject *kobj; in chrdev_open() local
383 kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx); in chrdev_open()
384 if (!kobj) in chrdev_open()
[all …]

12345678910>>...26