/linux-4.19.296/lib/ |
D | kobject.c | 28 const void *kobject_namespace(struct kobject *kobj) in kobject_namespace() argument 30 const struct kobj_ns_type_operations *ns_ops = kobj_ns_ops(kobj); in kobject_namespace() 35 return kobj->ktype->namespace(kobj); in kobject_namespace() 48 void kobject_get_ownership(struct kobject *kobj, kuid_t *uid, kgid_t *gid) in kobject_get_ownership() argument 53 if (kobj->ktype->get_ownership) in kobject_get_ownership() 54 kobj->ktype->get_ownership(kobj, uid, gid); in kobject_get_ownership() 66 static int populate_dir(struct kobject *kobj) in populate_dir() argument 68 struct kobj_type *t = get_ktype(kobj); in populate_dir() 75 error = sysfs_create_file(kobj, attr); in populate_dir() 83 static int create_dir(struct kobject *kobj) in create_dir() argument [all …]
|
D | kobject_uevent.c | 192 int kobject_synth_uevent(struct kobject *kobj, const char *buf, size_t count) in kobject_synth_uevent() argument 208 r = kobject_uevent_env(kobj, action, no_uuid_envp); in kobject_synth_uevent() 222 r = kobject_uevent_env(kobj, action, env->envp); in kobject_synth_uevent() 226 devpath = kobject_get_path(kobj, GFP_KERNEL); in kobject_synth_uevent() 236 static int kobj_usermode_filter(struct kobject *kobj) in kobj_usermode_filter() argument 240 ops = kobj_ns_ops(kobj); in kobj_usermode_filter() 243 ns = kobj->ktype->namespace(kobj); in kobj_usermode_filter() 380 static int kobject_uevent_net_broadcast(struct kobject *kobj, in kobject_uevent_net_broadcast() argument 391 ops = kobj_ns_ops(kobj); in kobject_uevent_net_broadcast() 392 if (!ops && kobj->kset) { in kobject_uevent_net_broadcast() [all …]
|
/linux-4.19.296/include/linux/ |
D | kobject.h | 84 int kobject_set_name(struct kobject *kobj, const char *name, ...); 86 int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, 89 static inline const char *kobject_name(const struct kobject *kobj) in kobject_name() argument 91 return kobj->name; in kobject_name() 94 extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); 96 int kobject_add(struct kobject *kobj, struct kobject *parent, 99 int kobject_init_and_add(struct kobject *kobj, 103 extern void kobject_del(struct kobject *kobj); 112 extern struct kobject *kobject_get(struct kobject *kobj); 114 struct kobject *kobj); [all …]
|
D | sysfs.h | 221 int __must_check sysfs_create_dir_ns(struct kobject *kobj, const void *ns); 222 void sysfs_remove_dir(struct kobject *kobj); 223 int __must_check sysfs_rename_dir_ns(struct kobject *kobj, const char *new_name, 225 int __must_check sysfs_move_dir_ns(struct kobject *kobj, 233 int __must_check sysfs_create_file_ns(struct kobject *kobj, 236 int __must_check sysfs_create_files(struct kobject *kobj, 238 int __must_check sysfs_chmod_file(struct kobject *kobj, 240 struct kernfs_node *sysfs_break_active_protection(struct kobject *kobj, 243 void sysfs_remove_file_ns(struct kobject *kobj, const struct attribute *attr, 245 bool sysfs_remove_file_self(struct kobject *kobj, const struct attribute *attr); [all …]
|
/linux-4.19.296/fs/sysfs/ |
D | file.c | 29 struct kobject *kobj = kn->parent->priv; in sysfs_file_ops() local 33 return kobj->ktype ? kobj->ktype->sysfs_ops : NULL; in sysfs_file_ops() 44 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show() local 62 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show() 85 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read() local 101 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read() 109 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_read() local 118 len = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_read() 135 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write() local 140 return ops->store(kobj, of->kn->priv, buf, count); in sysfs_kf_write() [all …]
|
D | group.c | 33 static int create_files(struct kernfs_node *parent, struct kobject *kobj, in create_files() argument 53 mode = grp->is_visible(kobj, *attr, i); in create_files() 82 mode = grp->is_bin_visible(kobj, *bin_attr, i); in create_files() 107 static int internal_create_group(struct kobject *kobj, int update, in internal_create_group() argument 115 BUG_ON(!kobj || (!update && !kobj->sd)); in internal_create_group() 118 if (unlikely(update && !kobj->sd)) in internal_create_group() 122 kobj->name, grp->name ?: ""); in internal_create_group() 125 kobject_get_ownership(kobj, &uid, &gid); in internal_create_group() 128 kn = kernfs_find_and_get(kobj->sd, grp->name); in internal_create_group() 131 kobj->name, grp->name); in internal_create_group() [all …]
|
D | dir.c | 40 int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) in sysfs_create_dir_ns() argument 46 BUG_ON(!kobj); in sysfs_create_dir_ns() 48 if (kobj->parent) in sysfs_create_dir_ns() 49 parent = kobj->parent->sd; in sysfs_create_dir_ns() 56 kobject_get_ownership(kobj, &uid, &gid); in sysfs_create_dir_ns() 58 kn = kernfs_create_dir_ns(parent, kobject_name(kobj), 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 …]
|
D | symlink.c | 66 static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target, in sysfs_do_create_link() argument 71 if (!kobj) in sysfs_do_create_link() 74 parent = kobj->sd; in sysfs_do_create_link() 88 int sysfs_create_link(struct kobject *kobj, struct kobject *target, in sysfs_create_link() argument 91 return sysfs_do_create_link(kobj, target, name, 1); in sysfs_create_link() 104 int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, in sysfs_create_link_nowarn() argument 107 return sysfs_do_create_link(kobj, target, name, 0); in sysfs_create_link_nowarn() 120 void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, in sysfs_delete_link() argument 131 if (targ->sd && kernfs_ns_enabled(kobj->sd)) in sysfs_delete_link() 134 kernfs_remove_by_name_ns(kobj->sd, name, ns); in sysfs_delete_link() [all …]
|
/linux-4.19.296/drivers/cpuidle/ |
D | sysfs.c | 151 return sysfs_create_group(&dev->kobj, &cpuidle_attr_group); in cpuidle_add_interface() 159 sysfs_remove_group(&dev->kobj, &cpuidle_attr_group); in cpuidle_remove_interface() 178 struct kobject kobj; member 181 static inline struct cpuidle_device *to_cpuidle_device(struct kobject *kobj) in to_cpuidle_device() argument 184 container_of(kobj, struct cpuidle_device_kobj, kobj); in to_cpuidle_device() 189 static ssize_t cpuidle_show(struct kobject *kobj, struct attribute *attr, in cpuidle_show() argument 193 struct cpuidle_device *dev = to_cpuidle_device(kobj); in cpuidle_show() 204 static ssize_t cpuidle_store(struct kobject *kobj, struct attribute *attr, in cpuidle_store() argument 208 struct cpuidle_device *dev = to_cpuidle_device(kobj); in cpuidle_store() 224 static void cpuidle_sysfs_release(struct kobject *kobj) in cpuidle_sysfs_release() argument [all …]
|
/linux-4.19.296/drivers/edac/ |
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, in edac_dev_ctl_info_show() argument 120 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); in edac_dev_ctl_info_show() 129 static ssize_t edac_dev_ctl_info_store(struct kobject *kobj, in edac_dev_ctl_info_store() argument 133 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); in edac_dev_ctl_info_store() 201 static void edac_device_ctrl_master_release(struct kobject *kobj) in edac_device_ctrl_master_release() argument 203 struct edac_device_ctl_info *edac_dev = to_edacdev(kobj); in edac_device_ctrl_master_release() 245 memset(&edac_dev->kobj, 0, sizeof(struct kobject)); in edac_device_register_sysfs_main_kobj() 258 err = kobject_init_and_add(&edac_dev->kobj, &ktype_device_ctrl, in edac_device_register_sysfs_main_kobj() [all …]
|
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) in edac_pci_instance_release() argument 81 pci = to_instance(kobj); in edac_pci_instance_release() 97 static ssize_t edac_pci_instance_show(struct kobject *kobj, in edac_pci_instance_show() argument 100 struct edac_pci_ctl_info *pci = to_instance(kobj); in edac_pci_instance_show() 109 static ssize_t edac_pci_instance_store(struct kobject *kobj, in edac_pci_instance_store() argument 113 struct edac_pci_ctl_info *pci = to_instance(kobj); in edac_pci_instance_store() 174 err = kobject_init_and_add(&pci->kobj, &ktype_pci_instance, in edac_pci_create_instance_kobj() 182 kobject_uevent(&pci->kobj, KOBJ_ADD); in edac_pci_create_instance_kobj() 206 kobject_put(&pci->kobj); in edac_pci_unregister_sysfs_instance_kobj() [all …]
|
/linux-4.19.296/block/ |
D | blk-mq-sysfs.c | 17 static void blk_mq_sysfs_release(struct kobject *kobj) in blk_mq_sysfs_release() argument 21 static void blk_mq_hw_sysfs_release(struct kobject *kobj) in blk_mq_hw_sysfs_release() argument 23 struct blk_mq_hw_ctx *hctx = container_of(kobj, struct blk_mq_hw_ctx, in blk_mq_hw_sysfs_release() 24 kobj); in blk_mq_hw_sysfs_release() 47 static ssize_t blk_mq_sysfs_show(struct kobject *kobj, struct attribute *attr, in blk_mq_sysfs_show() argument 56 ctx = container_of(kobj, struct blk_mq_ctx, kobj); in blk_mq_sysfs_show() 70 static ssize_t blk_mq_sysfs_store(struct kobject *kobj, struct attribute *attr, in blk_mq_sysfs_store() argument 79 ctx = container_of(kobj, struct blk_mq_ctx, kobj); in blk_mq_sysfs_store() 93 static ssize_t blk_mq_hw_sysfs_show(struct kobject *kobj, in blk_mq_hw_sysfs_show() argument 102 hctx = container_of(kobj, struct blk_mq_hw_ctx, kobj); in blk_mq_hw_sysfs_show() [all …]
|
/linux-4.19.296/drivers/of/ |
D | kobj.c | 10 return node && node->kobj.state_initialized; in of_node_is_initialized() 16 return node && node->kobj.state_in_sysfs; in of_node_is_attached() 21 static void of_node_release(struct kobject *kobj) in of_node_release() argument 31 static ssize_t of_node_property_read(struct file *filp, struct kobject *kobj, in of_node_property_read() argument 40 static const char *safe_name(struct kobject *kobj, const char *orig_name) in safe_name() argument 47 while (i < 16 && (kn = sysfs_get_dirent(kobj->sd, name))) { in safe_name() 58 kobject_name(kobj), name); in safe_name() 77 pp->attr.attr.name = safe_name(&np->kobj, pp->name); in __of_add_property_sysfs() 82 rc = sysfs_create_bin_file(&np->kobj, &pp->attr); in __of_add_property_sysfs() 92 sysfs_remove_bin_file(&np->kobj, &prop->attr); in __of_sysfs_remove_bin_file() [all …]
|
/linux-4.19.296/fs/xfs/ |
D | xfs_sysfs.h | 24 struct xfs_kobj *kobj = to_kobj(kobject); in xfs_sysfs_release() local 25 complete(&kobj->complete); in xfs_sysfs_release() 30 struct xfs_kobj *kobj, in xfs_sysfs_init() argument 38 init_completion(&kobj->complete); in xfs_sysfs_init() 39 return kobject_init_and_add(&kobj->kobject, ktype, parent, "%s", name); in xfs_sysfs_init() 44 struct xfs_kobj *kobj) in xfs_sysfs_del() argument 46 kobject_del(&kobj->kobject); in xfs_sysfs_del() 47 kobject_put(&kobj->kobject); in xfs_sysfs_del() 48 wait_for_completion(&kobj->complete); in xfs_sysfs_del()
|
/linux-4.19.296/fs/btrfs/ |
D | sysfs.c | 21 static inline struct btrfs_fs_info *to_fs_info(struct kobject *kobj); 22 static inline struct btrfs_fs_devices *to_fs_devs(struct kobject *kobj); 79 static ssize_t btrfs_feature_attr_show(struct kobject *kobj, in btrfs_feature_attr_show() argument 83 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show() 95 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, in btrfs_feature_attr_store() argument 105 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store() 163 static umode_t btrfs_feature_visible(struct kobject *kobj, in btrfs_feature_visible() argument 166 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_visible() 225 static ssize_t rmdir_subvol_show(struct kobject *kobj, in rmdir_subvol_show() argument 259 static ssize_t global_rsv_size_show(struct kobject *kobj, in global_rsv_size_show() argument [all …]
|
/linux-4.19.296/drivers/base/ |
D | class.c | 24 static ssize_t class_attr_show(struct kobject *kobj, struct attribute *attr, in class_attr_show() argument 28 struct subsys_private *cp = to_subsys_private(kobj); in class_attr_show() 36 static ssize_t class_attr_store(struct kobject *kobj, struct attribute *attr, in class_attr_store() argument 40 struct subsys_private *cp = to_subsys_private(kobj); in class_attr_store() 48 static void class_release(struct kobject *kobj) in class_release() argument 50 struct subsys_private *cp = to_subsys_private(kobj); in class_release() 64 static const struct kobj_ns_type_operations *class_child_ns_type(struct kobject *kobj) in class_child_ns_type() argument 66 struct subsys_private *cp = to_subsys_private(kobj); in class_child_ns_type() 93 error = sysfs_create_file_ns(&cls->p->subsys.kobj, in class_create_file_ns() 104 sysfs_remove_file_ns(&cls->p->subsys.kobj, &attr->attr, ns); in class_remove_file_ns() [all …]
|
D | core.c | 942 static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, in dev_attr_show() argument 946 struct device *dev = kobj_to_dev(kobj); in dev_attr_show() 958 static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr, in dev_attr_store() argument 962 struct device *dev = kobj_to_dev(kobj); in dev_attr_store() 1055 static void device_release(struct kobject *kobj) in device_release() argument 1057 struct device *dev = kobj_to_dev(kobj); in device_release() 1084 static const void *device_namespace(struct kobject *kobj) in device_namespace() argument 1086 struct device *dev = kobj_to_dev(kobj); in device_namespace() 1095 static void device_get_ownership(struct kobject *kobj, kuid_t *uid, kgid_t *gid) in device_get_ownership() argument 1097 struct device *dev = kobj_to_dev(kobj); in device_get_ownership() [all …]
|
/linux-4.19.296/drivers/pci/ |
D | slot.c | 18 static ssize_t pci_slot_attr_show(struct kobject *kobj, in pci_slot_attr_show() argument 21 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_attr_show() 26 static ssize_t pci_slot_attr_store(struct kobject *kobj, in pci_slot_attr_store() argument 29 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_attr_store() 103 static void pci_slot_release(struct kobject *kobj) in pci_slot_release() argument 106 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_release() 192 result = kobject_rename(&slot->kobj, slot_name); in rename_slot() 216 kobject_get(&slot->kobj); in get_slot() 284 kobject_put(&slot->kobj); in pci_create_slot() 302 slot->kobj.kset = pci_slots_kset; in pci_create_slot() [all …]
|
/linux-4.19.296/fs/ |
D | char_dev.c | 295 kobject_set_name(&cdev->kobj, "%s", name); in __register_chrdev() 305 kobject_put(&cdev->kobj); in __register_chrdev() 360 struct kobject *kobj; in cdev_get() local 364 kobj = kobject_get_unless_zero(&p->kobj); in cdev_get() 365 if (!kobj) in cdev_get() 367 return kobj; in cdev_get() 374 kobject_put(&p->kobj); in cdev_put() 392 struct kobject *kobj; in chrdev_open() local 395 kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx); in chrdev_open() 396 if (!kobj) in chrdev_open() [all …]
|
/linux-4.19.296/drivers/parisc/ |
D | pdc_stable.c | 106 struct kobject kobj; member 137 #define to_pdcspath_entry(obj) container_of(obj, struct pdcspath_entry, kobj) 335 sysfs_remove_link(&entry->kobj, "device"); in pdcspath_hwpath_write() 338 ret = sysfs_create_link(&entry->kobj, &entry->dev->kobj, "device"); in pdcspath_hwpath_write() 448 pdcspath_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) in pdcspath_attr_show() argument 450 struct pdcspath_entry *entry = to_pdcspath_entry(kobj); in pdcspath_attr_show() 468 pdcspath_attr_store(struct kobject *kobj, struct attribute *attr, in pdcspath_attr_store() argument 471 struct pdcspath_entry *entry = to_pdcspath_entry(kobj); in pdcspath_attr_store() 528 static ssize_t pdcs_size_read(struct kobject *kobj, in pdcs_size_read() argument 548 static ssize_t pdcs_auto_read(struct kobject *kobj, in pdcs_auto_read() argument [all …]
|
/linux-4.19.296/drivers/cpufreq/ |
D | cpufreq_governor_attr_set.c | 14 static inline struct gov_attr_set *to_gov_attr_set(struct kobject *kobj) in to_gov_attr_set() argument 16 return container_of(kobj, struct gov_attr_set, kobj); in to_gov_attr_set() 24 static ssize_t governor_show(struct kobject *kobj, struct attribute *attr, in governor_show() argument 29 return gattr->show(to_gov_attr_set(kobj), buf); in governor_show() 32 static ssize_t governor_store(struct kobject *kobj, struct attribute *attr, in governor_store() argument 35 struct gov_attr_set *attr_set = to_gov_attr_set(kobj); in governor_store() 81 kobject_put(&attr_set->kobj); in gov_attr_set_put()
|
/linux-4.19.296/drivers/i2c/ |
D | i2c-slave-eeprom.c | 77 static ssize_t i2c_slave_eeprom_bin_read(struct file *filp, struct kobject *kobj, in i2c_slave_eeprom_bin_read() argument 83 eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj)); in i2c_slave_eeprom_bin_read() 92 static ssize_t i2c_slave_eeprom_bin_write(struct file *filp, struct kobject *kobj, in i2c_slave_eeprom_bin_write() argument 98 eeprom = dev_get_drvdata(container_of(kobj, struct device, kobj)); in i2c_slave_eeprom_bin_write() 128 ret = sysfs_create_bin_file(&client->dev.kobj, &eeprom->bin); in i2c_slave_eeprom_probe() 134 sysfs_remove_bin_file(&client->dev.kobj, &eeprom->bin); in i2c_slave_eeprom_probe() 146 sysfs_remove_bin_file(&client->dev.kobj, &eeprom->bin); in i2c_slave_eeprom_remove()
|
/linux-4.19.296/drivers/uwb/ |
D | pal.c | 48 ret = sysfs_create_link(&pal->device->kobj, in uwb_pal_register() 49 &rc->uwb_dev.dev.kobj, "uwb_rc"); in uwb_pal_register() 53 ret = sysfs_create_link(&rc->uwb_dev.dev.kobj, in uwb_pal_register() 54 &pal->device->kobj, pal->name); in uwb_pal_register() 56 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); in uwb_pal_register() 124 sysfs_remove_link(&rc->uwb_dev.dev.kobj, pal->name); in uwb_pal_unregister() 127 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); in uwb_pal_unregister()
|
/linux-4.19.296/drivers/hid/ |
D | hid-roccat-lua.c | 29 static ssize_t lua_sysfs_read(struct file *fp, struct kobject *kobj, in lua_sysfs_read() argument 33 struct device *dev = kobj_to_dev(kobj); in lua_sysfs_read() 51 static ssize_t lua_sysfs_write(struct file *fp, struct kobject *kobj, in lua_sysfs_write() argument 55 struct device *dev = kobj_to_dev(kobj); in 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); in LUA_BIN_ATTRIBUTE_RW() 107 sysfs_remove_bin_file(&intf->dev.kobj, &lua_control_attr); in lua_remove_sysfs_attributes()
|
/linux-4.19.296/fs/orangefs/ |
D | orangefs-sysfs.c | 159 ssize_t (*show)(struct kobject *kobj, 162 ssize_t (*store)(struct kobject *kobj, 168 static ssize_t orangefs_attr_show(struct kobject *kobj, in orangefs_attr_show() argument 177 return attribute->show(kobj, attribute, buf); in orangefs_attr_show() 180 static ssize_t orangefs_attr_store(struct kobject *kobj, in orangefs_attr_store() argument 187 if (!strcmp(kobj->name, PC_KOBJ_ID) || in orangefs_attr_store() 188 !strcmp(kobj->name, STATS_KOBJ_ID)) in orangefs_attr_store() 194 return attribute->store(kobj, attribute, buf, len); in orangefs_attr_store() 202 static ssize_t sysfs_int_show(struct kobject *kobj, in sysfs_int_show() argument 208 kobj->name); in sysfs_int_show() [all …]
|