/linux-4.4.14/lib/ |
D | kobject.c | 30 const void *kobject_namespace(struct kobject *kobj) in kobject_namespace() argument 32 const struct kobj_ns_type_operations *ns_ops = kobj_ns_ops(kobj); in kobject_namespace() 37 return kobj->ktype->namespace(kobj); in kobject_namespace() 49 static int populate_dir(struct kobject *kobj) in populate_dir() argument 51 struct kobj_type *t = get_ktype(kobj); in populate_dir() 58 error = sysfs_create_file(kobj, attr); in populate_dir() 66 static int create_dir(struct kobject *kobj) in create_dir() argument 71 error = sysfs_create_dir_ns(kobj, kobject_namespace(kobj)); in create_dir() 75 error = populate_dir(kobj); in create_dir() 77 sysfs_remove_dir(kobj); in create_dir() [all …]
|
D | kobject_uevent.c | 92 struct kobject *kobj = data, *ksobj; in kobj_bcast_filter() local 95 ops = kobj_ns_ops(kobj); in kobj_bcast_filter() 96 if (!ops && kobj->kset) { in kobj_bcast_filter() 97 ksobj = &kobj->kset->kobj; in kobj_bcast_filter() 102 if (ops && ops->netlink_ns && kobj->ktype->namespace) { in kobj_bcast_filter() 104 ns = kobj->ktype->namespace(kobj); in kobj_bcast_filter() 114 static int kobj_usermode_filter(struct kobject *kobj) in kobj_usermode_filter() argument 118 ops = kobj_ns_ops(kobj); in kobj_usermode_filter() 121 ns = kobj->ktype->namespace(kobj); in kobj_usermode_filter() 164 int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, in kobject_uevent_env() argument [all …]
|
/linux-4.4.14/include/linux/ |
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); [all …]
|
D | kobject.h | 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) in kobject_name() argument 89 return kobj->name; in 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); [all …]
|
D | livepatch.h | 61 struct kobject kobj; member 102 struct kobject kobj; member 122 struct kobject kobj; member
|
/linux-4.4.14/fs/sysfs/ |
D | file.c | 30 struct kobject *kobj = kn->parent->priv; in sysfs_file_ops() local 34 return kobj->ktype ? kobj->ktype->sysfs_ops : NULL; in sysfs_file_ops() 45 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_seq_show() local 63 count = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_seq_show() 86 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_bin_read() local 102 return battr->read(of->file, kobj, battr, buf, pos, count); in sysfs_kf_bin_read() 110 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_read() local 119 len = ops->show(kobj, of->kn->priv, buf); in sysfs_kf_read() 128 struct kobject *kobj = of->kn->parent->priv; in sysfs_kf_write() local 133 return ops->store(kobj, of->kn->priv, buf, count); in sysfs_kf_write() [all …]
|
D | group.c | 35 static int create_files(struct kernfs_node *parent, struct kobject *kobj, in create_files() argument 54 mode = grp->is_visible(kobj, *attr, i); in create_files() 83 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 113 BUG_ON(!kobj || (!update && !kobj->sd)); in internal_create_group() 116 if (unlikely(update && !kobj->sd)) in internal_create_group() 120 kobj->name, grp->name ?: ""); in internal_create_group() 124 kn = kernfs_create_dir(kobj->sd, grp->name, in internal_create_group() 125 S_IRWXU | S_IRUGO | S_IXUGO, kobj); in internal_create_group() 128 sysfs_warn_dup(kobj->sd, grp->name); in internal_create_group() [all …]
|
D | dir.c | 41 int sysfs_create_dir_ns(struct kobject *kobj, const void *ns) in sysfs_create_dir_ns() argument 45 BUG_ON(!kobj); in sysfs_create_dir_ns() 47 if (kobj->parent) in sysfs_create_dir_ns() 48 parent = kobj->parent->sd; in sysfs_create_dir_ns() 55 kn = kernfs_create_dir_ns(parent, kobject_name(kobj), in sysfs_create_dir_ns() 56 S_IRWXU | S_IRUGO | S_IXUGO, kobj, ns); in sysfs_create_dir_ns() 59 sysfs_warn_dup(parent, kobject_name(kobj)); in sysfs_create_dir_ns() 63 kobj->sd = kn; in sysfs_create_dir_ns() 75 void sysfs_remove_dir(struct kobject *kobj) in sysfs_remove_dir() argument 77 struct kernfs_node *kn = kobj->sd; in sysfs_remove_dir() [all …]
|
D | symlink.c | 67 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() 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.4.14/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() 250 memset(&edac_dev->kobj, 0, sizeof(struct kobject)); in edac_device_register_sysfs_main_kobj() 263 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.4.14/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.4.14/drivers/base/ |
D | core.c | 113 static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, in dev_attr_show() argument 117 struct device *dev = kobj_to_dev(kobj); in dev_attr_show() 129 static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr, in dev_attr_store() argument 133 struct device *dev = kobj_to_dev(kobj); in dev_attr_store() 226 static void device_release(struct kobject *kobj) in device_release() argument 228 struct device *dev = kobj_to_dev(kobj); in device_release() 255 static const void *device_namespace(struct kobject *kobj) in device_namespace() argument 257 struct device *dev = kobj_to_dev(kobj); in device_namespace() 273 static int dev_uevent_filter(struct kset *kset, struct kobject *kobj) in dev_uevent_filter() argument 275 struct kobj_type *ktype = get_ktype(kobj); in dev_uevent_filter() [all …]
|
D | class.c | 26 static ssize_t class_attr_show(struct kobject *kobj, struct attribute *attr, in class_attr_show() argument 30 struct subsys_private *cp = to_subsys_private(kobj); in class_attr_show() 38 static ssize_t class_attr_store(struct kobject *kobj, struct attribute *attr, in class_attr_store() argument 42 struct subsys_private *cp = to_subsys_private(kobj); in class_attr_store() 50 static void class_release(struct kobject *kobj) in class_release() argument 52 struct subsys_private *cp = to_subsys_private(kobj); in class_release() 66 static const struct kobj_ns_type_operations *class_child_ns_type(struct kobject *kobj) in class_child_ns_type() argument 68 struct subsys_private *cp = to_subsys_private(kobj); in class_child_ns_type() 95 error = sysfs_create_file_ns(&cls->p->subsys.kobj, in class_create_file_ns() 106 sysfs_remove_file_ns(&cls->p->subsys.kobj, &attr->attr, ns); in class_remove_file_ns() [all …]
|
D | bus.c | 55 static ssize_t drv_attr_show(struct kobject *kobj, struct attribute *attr, in drv_attr_show() argument 59 struct driver_private *drv_priv = to_driver(kobj); in drv_attr_show() 67 static ssize_t drv_attr_store(struct kobject *kobj, struct attribute *attr, in drv_attr_store() argument 71 struct driver_private *drv_priv = to_driver(kobj); in drv_attr_store() 84 static void driver_release(struct kobject *kobj) in driver_release() argument 86 struct driver_private *drv_priv = to_driver(kobj); in driver_release() 88 pr_debug("driver: '%s': %s\n", kobject_name(kobj), __func__); in driver_release() 100 static ssize_t bus_attr_show(struct kobject *kobj, struct attribute *attr, in bus_attr_show() argument 104 struct subsys_private *subsys_priv = to_subsys_private(kobj); in bus_attr_show() 112 static ssize_t bus_attr_store(struct kobject *kobj, struct attribute *attr, in bus_attr_store() argument [all …]
|
D | module.c | 30 mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); in module_create_drivers_dir() 50 mk = container_of(mkobj, struct module_kobject, kobj); in module_add_driver() 62 no_warn = sysfs_create_link(&drv->p->kobj, &mk->kobj, "module"); in module_add_driver() 66 no_warn = sysfs_create_link(mk->drivers_dir, &drv->p->kobj, in module_add_driver() 80 sysfs_remove_link(&drv->p->kobj, "module"); in module_remove_driver()
|
D | devcoredump.c | 70 if (devcd->failing_dev->kobj.sd) in devcd_dev_release() 71 sysfs_delete_link(&devcd->failing_dev->kobj, &dev->kobj, in devcd_dev_release() 88 static ssize_t devcd_data_read(struct file *filp, struct kobject *kobj, in devcd_data_read() argument 92 struct device *dev = kobj_to_dev(kobj); in devcd_data_read() 98 static ssize_t devcd_data_write(struct file *filp, struct kobject *kobj, in devcd_data_write() argument 102 struct device *dev = kobj_to_dev(kobj); in devcd_data_write() 273 if (sysfs_create_link(&devcd->devcd_dev.kobj, &dev->kobj, in dev_coredumpm() 277 if (sysfs_create_link(&dev->kobj, &devcd->devcd_dev.kobj, in dev_coredumpm()
|
D | node.c | 329 ret = sysfs_create_link(&node_devices[nid]->dev.kobj, in register_cpu_under_node() 330 &obj->kobj, in register_cpu_under_node() 331 kobject_name(&obj->kobj)); in register_cpu_under_node() 335 return sysfs_create_link(&obj->kobj, in register_cpu_under_node() 336 &node_devices[nid]->dev.kobj, in register_cpu_under_node() 337 kobject_name(&node_devices[nid]->dev.kobj)); in register_cpu_under_node() 351 sysfs_remove_link(&node_devices[nid]->dev.kobj, in unregister_cpu_under_node() 352 kobject_name(&obj->kobj)); in unregister_cpu_under_node() 353 sysfs_remove_link(&obj->kobj, in unregister_cpu_under_node() 354 kobject_name(&node_devices[nid]->dev.kobj)); in unregister_cpu_under_node() [all …]
|
D | dd.c | 199 __func__, kobject_name(&dev->kobj)); in driver_bound() 228 ret = sysfs_create_link(&dev->driver->p->kobj, &dev->kobj, in driver_sysfs_add() 229 kobject_name(&dev->kobj)); in driver_sysfs_add() 231 ret = sysfs_create_link(&dev->kobj, &dev->driver->p->kobj, in driver_sysfs_add() 234 sysfs_remove_link(&dev->driver->p->kobj, in driver_sysfs_add() 235 kobject_name(&dev->kobj)); in driver_sysfs_add() 245 sysfs_remove_link(&drv->p->kobj, kobject_name(&dev->kobj)); in driver_sysfs_remove() 246 sysfs_remove_link(&dev->kobj, "driver"); in driver_sysfs_remove()
|
D | driver.c | 108 error = sysfs_create_file(&drv->p->kobj, &attr->attr); in driver_create_file() 124 sysfs_remove_file(&drv->p->kobj, &attr->attr); in driver_remove_file() 131 return sysfs_create_groups(&drv->p->kobj, groups); in driver_add_groups() 137 sysfs_remove_groups(&drv->p->kobj, groups); in driver_remove_groups() 176 kobject_uevent(&drv->p->kobj, KOBJ_ADD); in driver_register()
|
D | base.h | 44 #define to_subsys_private(obj) container_of(obj, struct subsys_private, subsys.kobj) 47 struct kobject kobj; member 53 #define to_driver(obj) container_of(obj, struct driver_private, kobj) 131 extern char *make_class_name(const char *name, struct kobject *kobj);
|
D | map.c | 97 struct kobject *kobj; in kobj_lookup() local 124 kobj = probe(dev, index, data); in kobj_lookup() 127 if (kobj) in kobj_lookup() 128 return kobj; in kobj_lookup()
|
/linux-4.4.14/drivers/w1/slaves/ |
D | w1_ds2408.c | 75 static ssize_t state_read(struct file *filp, struct kobject *kobj, in state_read() argument 79 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in state_read() 81 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in state_read() 84 return _read_reg(kobj_to_w1_slave(kobj), W1_F29_REG_LOGIG_STATE, buf); in state_read() 87 static ssize_t output_read(struct file *filp, struct kobject *kobj, in output_read() argument 91 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in output_read() 93 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in output_read() 96 return _read_reg(kobj_to_w1_slave(kobj), in output_read() 100 static ssize_t activity_read(struct file *filp, struct kobject *kobj, in activity_read() argument 104 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in activity_read() [all …]
|
D | w1_ds2406.c | 32 struct file *filp, struct kobject *kobj, in w1_f12_read_state() argument 37 struct w1_slave *sl = kobj_to_w1_slave(kobj); in w1_f12_read_state() 69 struct file *filp, struct kobject *kobj, in w1_f12_write_output() argument 73 struct w1_slave *sl = kobj_to_w1_slave(kobj); in w1_f12_write_output() 130 &sl->dev.kobj, in w1_f12_add_slave() 134 sysfs_remove_bin_file(&sl->dev.kobj, in w1_f12_add_slave() 143 sysfs_remove_bin_file(&sl->dev.kobj, in w1_f12_remove_slave()
|
D | w1_ds2413.c | 33 static ssize_t state_read(struct file *filp, struct kobject *kobj, in state_read() argument 37 struct w1_slave *sl = kobj_to_w1_slave(kobj); in state_read() 40 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in state_read() 70 static ssize_t output_write(struct file *filp, struct kobject *kobj, in output_write() argument 74 struct w1_slave *sl = kobj_to_w1_slave(kobj); in output_write()
|
D | w1_ds28e04.c | 121 static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, in eeprom_read() argument 125 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_read() 229 static ssize_t eeprom_write(struct file *filp, struct kobject *kobj, in eeprom_write() argument 234 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_write() 285 static ssize_t pio_read(struct file *filp, struct kobject *kobj, in pio_read() argument 290 struct w1_slave *sl = kobj_to_w1_slave(kobj); in pio_read() 304 static ssize_t pio_write(struct file *filp, struct kobject *kobj, in pio_write() argument 309 struct w1_slave *sl = kobj_to_w1_slave(kobj); in pio_write()
|
D | w1_ds2431.c | 99 static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, in eeprom_read() argument 103 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_read() 205 static ssize_t eeprom_write(struct file *filp, struct kobject *kobj, in eeprom_write() argument 209 struct w1_slave *sl = kobj_to_w1_slave(kobj); in eeprom_write()
|
/linux-4.4.14/fs/xfs/ |
D | xfs_sysfs.h | 36 struct xfs_kobj *kobj = to_kobj(kobject); in xfs_sysfs_release() local 37 complete(&kobj->complete); in xfs_sysfs_release() 42 struct xfs_kobj *kobj, in xfs_sysfs_init() argument 47 init_completion(&kobj->complete); in xfs_sysfs_init() 48 return kobject_init_and_add(&kobj->kobject, ktype, in xfs_sysfs_init() 54 struct xfs_kobj *kobj) in xfs_sysfs_del() argument 56 kobject_del(&kobj->kobject); in xfs_sysfs_del() 57 kobject_put(&kobj->kobject); in xfs_sysfs_del() 58 wait_for_completion(&kobj->complete); in xfs_sysfs_del()
|
D | xfs_sysfs.c | 137 struct xfs_kobj *kobj = to_kobj(kobject); in to_xstats() local 139 return container_of(kobj, struct xstats, xs_kobj); in to_xstats() 192 struct xfs_kobj *kobj = to_kobj(kobject); in to_xlog() local 194 return container_of(kobj, struct xlog, l_kobj); in to_xlog()
|
/linux-4.4.14/fs/btrfs/ |
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, in btrfs_feature_attr_show() argument 97 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_attr_show() 109 static ssize_t btrfs_feature_attr_store(struct kobject *kobj, in btrfs_feature_attr_store() argument 119 fs_info = to_fs_info(kobj); in btrfs_feature_attr_store() 174 static umode_t btrfs_feature_visible(struct kobject *kobj, in btrfs_feature_visible() argument 177 struct btrfs_fs_info *fs_info = to_fs_info(kobj); in btrfs_feature_visible() 236 static ssize_t global_rsv_size_show(struct kobject *kobj, in global_rsv_size_show() argument 239 struct btrfs_fs_info *fs_info = to_fs_info(kobj->parent); in global_rsv_size_show() [all …]
|
/linux-4.4.14/net/batman-adv/ |
D | sysfs.c | 50 struct device *dev = container_of(obj->parent, struct device, kobj); in batadv_kobj_to_netdev() 95 if (vlan_tmp->kobj != obj) in 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); \ [all …]
|
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/firmware/efi/ |
D | runtime-map.c | 23 struct kobject kobj; /* kobject for each entry */ member 56 static inline struct efi_runtime_map_entry *to_map_entry(struct kobject *kobj) in to_map_entry() argument 58 return container_of(kobj, struct efi_runtime_map_entry, kobj); in to_map_entry() 61 static ssize_t map_attr_show(struct kobject *kobj, struct attribute *attr, in map_attr_show() argument 64 struct efi_runtime_map_entry *entry = to_map_entry(kobj); in map_attr_show() 92 static void map_release(struct kobject *kobj) in map_release() argument 96 entry = to_map_entry(kobj); in map_release() 109 add_sysfs_runtime_map_entry(struct kobject *kobj, int nr) in add_sysfs_runtime_map_entry() argument 115 map_kset = kset_create_and_add("runtime-map", NULL, kobj); in add_sysfs_runtime_map_entry() 130 kobject_init(&entry->kobj, &map_ktype); in add_sysfs_runtime_map_entry() [all …]
|
D | esrt.c | 65 struct kobject kobj; member 80 static struct esre_entry *to_entry(struct kobject *kobj) in to_entry() argument 82 return container_of(kobj, struct esre_entry, kobj); in to_entry() 90 static ssize_t esre_attr_show(struct kobject *kobj, in esre_attr_show() argument 93 struct esre_entry *entry = to_entry(kobj); in esre_attr_show() 149 static void esre_release(struct kobject *kobj) in esre_release() argument 151 struct esre_entry *entry = to_entry(kobj); in esre_release() 178 entry->kobj.kset = esrt_kset; in esre_create_sysfs_entry() 184 rc = kobject_init_and_add(&entry->kobj, &esre1_ktype, NULL, in esre_create_sysfs_entry() 198 static ssize_t esrt_##name##_show(struct kobject *kobj, \ [all …]
|
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, in efivar_attr_show() argument 353 struct efivar_entry *var = to_efivar_entry(kobj); in efivar_attr_show() 366 static ssize_t efivar_attr_store(struct kobject *kobj, struct attribute *attr, in efivar_attr_store() argument 369 struct efivar_entry *var = to_efivar_entry(kobj); in efivar_attr_store() 387 static void efivar_release(struct kobject *kobj) in efivar_release() argument 389 struct efivar_entry *var = container_of(kobj, struct efivar_entry, kobj); in efivar_release() 414 static ssize_t efivar_create(struct file *filp, struct kobject *kobj, in efivar_create() argument 484 static ssize_t efivar_delete(struct file *filp, struct kobject *kobj, in efivar_delete() argument 569 new_var->kobj.kset = efivars_kset; in efivar_create_sysfs_entry() [all …]
|
/linux-4.4.14/drivers/staging/lustre/lustre/osc/ |
D | lproc_osc.c | 45 static ssize_t active_show(struct kobject *kobj, struct attribute *attr, in active_show() argument 48 struct obd_device *dev = container_of(kobj, struct obd_device, in active_show() 54 static ssize_t active_store(struct kobject *kobj, struct attribute *attr, in active_store() argument 58 struct obd_device *dev = container_of(kobj, struct obd_device, in active_store() 80 static ssize_t max_rpcs_in_flight_show(struct kobject *kobj, in max_rpcs_in_flight_show() argument 84 struct obd_device *dev = container_of(kobj, struct obd_device, in max_rpcs_in_flight_show() 91 static ssize_t max_rpcs_in_flight_store(struct kobject *kobj, in max_rpcs_in_flight_store() argument 96 struct obd_device *dev = container_of(kobj, struct obd_device, in max_rpcs_in_flight_store() 132 static ssize_t max_dirty_mb_show(struct kobject *kobj, in max_dirty_mb_show() argument 136 struct obd_device *dev = container_of(kobj, struct obd_device, in max_dirty_mb_show() [all …]
|
/linux-4.4.14/drivers/pci/ |
D | slot.c | 19 static ssize_t pci_slot_attr_show(struct kobject *kobj, in pci_slot_attr_show() argument 22 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_attr_show() 27 static ssize_t pci_slot_attr_store(struct kobject *kobj, in pci_slot_attr_store() argument 30 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_attr_store() 102 static void pci_slot_release(struct kobject *kobj) in pci_slot_release() argument 105 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_release() 191 result = kobject_rename(&slot->kobj, slot_name); in rename_slot() 215 kobject_get(&slot->kobj); in get_slot() 283 kobject_put(&slot->kobj); in pci_create_slot() 301 slot->kobj.kset = pci_slots_kset; in pci_create_slot() [all …]
|
D | pci-sysfs.c | 629 static ssize_t pci_read_config(struct file *filp, struct kobject *kobj, in pci_read_config() argument 633 struct pci_dev *dev = to_pci_dev(container_of(kobj, struct device, in pci_read_config() 634 kobj)); in pci_read_config() 706 static ssize_t pci_write_config(struct file *filp, struct kobject *kobj, in pci_write_config() argument 710 struct pci_dev *dev = to_pci_dev(container_of(kobj, struct device, in pci_write_config() 711 kobj)); in pci_write_config() 768 static ssize_t read_vpd_attr(struct file *filp, struct kobject *kobj, in read_vpd_attr() argument 773 to_pci_dev(container_of(kobj, struct device, kobj)); in read_vpd_attr() 783 static ssize_t write_vpd_attr(struct file *filp, struct kobject *kobj, in write_vpd_attr() argument 788 to_pci_dev(container_of(kobj, struct device, kobj)); in write_vpd_attr() [all …]
|
D | pci-label.c | 74 static umode_t smbios_instance_string_exist(struct kobject *kobj, in smbios_instance_string_exist() argument 80 dev = container_of(kobj, struct device, kobj); in smbios_instance_string_exist() 130 return sysfs_create_group(&pdev->dev.kobj, &smbios_attr_group); in pci_create_smbiosname_file() 135 sysfs_remove_group(&pdev->dev.kobj, &smbios_attr_group); in pci_remove_smbiosname_file() 219 static umode_t acpi_index_string_exist(struct kobject *kobj, in acpi_index_string_exist() argument 224 dev = container_of(kobj, struct device, kobj); in acpi_index_string_exist() 267 return sysfs_create_group(&pdev->dev.kobj, &acpi_attr_group); in pci_create_acpi_index_label_files() 272 sysfs_remove_group(&pdev->dev.kobj, &acpi_attr_group); in pci_remove_acpi_index_label_files()
|
D | iov.c | 166 rc = sysfs_create_link(&dev->dev.kobj, &virtfn->dev.kobj, buf); in virtfn_add() 169 rc = sysfs_create_link(&virtfn->dev.kobj, &dev->dev.kobj, "physfn"); in virtfn_add() 173 kobject_uevent(&virtfn->dev.kobj, KOBJ_CHANGE); in virtfn_add() 178 sysfs_remove_link(&dev->dev.kobj, buf); in virtfn_add() 209 sysfs_remove_link(&dev->dev.kobj, buf); in virtfn_remove() 215 if (virtfn->dev.kobj.sd) in virtfn_remove() 216 sysfs_remove_link(&virtfn->dev.kobj, "physfn"); in virtfn_remove() 299 rc = sysfs_create_link(&dev->dev.kobj, in sriov_enable() 300 &pdev->dev.kobj, "dep_link"); in sriov_enable() 329 kobject_uevent(&dev->dev.kobj, KOBJ_CHANGE); in sriov_enable() [all …]
|
/linux-4.4.14/arch/powerpc/platforms/powernv/ |
D | opal-elog.c | 25 struct kobject kobj; member 32 #define to_elog_obj(x) container_of(x, struct elog_obj, kobj) 80 sysfs_remove_file_self(&elog_obj->kobj, &attr->attr); in elog_ack_store() 81 kobject_put(&elog_obj->kobj); in elog_ack_store() 94 static ssize_t elog_attr_show(struct kobject *kobj, in elog_attr_show() argument 102 elog = to_elog_obj(kobj); in elog_attr_show() 110 static ssize_t elog_attr_store(struct kobject *kobj, in elog_attr_store() argument 118 elog = to_elog_obj(kobj); in elog_attr_store() 131 static void elog_release(struct kobject *kobj) in elog_release() argument 135 elog = to_elog_obj(kobj); in elog_release() [all …]
|
D | opal-dump.c | 25 struct kobject kobj; member 32 #define to_dump_obj(x) container_of(x, struct dump_obj, kobj) 96 sysfs_remove_file_self(&dump_obj->kobj, &attr->attr); in dump_ack_store() 97 kobject_put(&dump_obj->kobj); in dump_ack_store() 158 static ssize_t dump_attr_show(struct kobject *kobj, in dump_attr_show() argument 166 dump = to_dump_obj(kobj); in dump_attr_show() 174 static ssize_t dump_attr_store(struct kobject *kobj, in dump_attr_store() argument 182 dump = to_dump_obj(kobj); in dump_attr_store() 195 static void dump_release(struct kobject *kobj) in dump_release() argument 199 dump = to_dump_obj(kobj); in dump_release() [all …]
|
D | opal-flash.c | 154 static ssize_t validate_show(struct kobject *kobj, in validate_show() argument 194 static ssize_t validate_store(struct kobject *kobj, in validate_store() argument 239 static ssize_t manage_show(struct kobject *kobj, in manage_show() argument 256 static ssize_t manage_store(struct kobject *kobj, in manage_store() argument 350 static ssize_t update_show(struct kobject *kobj, in update_show() argument 362 static ssize_t update_store(struct kobject *kobj, in update_store() argument 464 static ssize_t image_data_write(struct file *filp, struct kobject *kobj, in image_data_write() argument
|
/linux-4.4.14/fs/ |
D | char_dev.c | 260 kobject_set_name(&cdev->kobj, "%s", name); in __register_chrdev() 270 kobject_put(&cdev->kobj); in __register_chrdev() 325 struct kobject *kobj; in cdev_get() local 329 kobj = kobject_get(&p->kobj); in cdev_get() 330 if (!kobj) in cdev_get() 332 return kobj; in cdev_get() 339 kobject_put(&p->kobj); in cdev_put() 357 struct kobject *kobj; in chrdev_open() local 360 kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx); in chrdev_open() 361 if (!kobj) in chrdev_open() [all …]
|
/linux-4.4.14/kernel/ |
D | ksysfs.c | 33 static ssize_t uevent_seqnum_show(struct kobject *kobj, in uevent_seqnum_show() argument 42 static ssize_t uevent_helper_show(struct kobject *kobj, in uevent_helper_show() argument 47 static ssize_t uevent_helper_store(struct kobject *kobj, in uevent_helper_store() argument 63 static ssize_t profiling_show(struct kobject *kobj, in profiling_show() argument 68 static ssize_t profiling_store(struct kobject *kobj, in profiling_store() argument 94 static ssize_t kexec_loaded_show(struct kobject *kobj, in kexec_loaded_show() argument 101 static ssize_t kexec_crash_loaded_show(struct kobject *kobj, in kexec_crash_loaded_show() argument 108 static ssize_t kexec_crash_size_show(struct kobject *kobj, in kexec_crash_size_show() argument 113 static ssize_t kexec_crash_size_store(struct kobject *kobj, in kexec_crash_size_store() argument 128 static ssize_t vmcoreinfo_show(struct kobject *kobj, in vmcoreinfo_show() argument [all …]
|
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); in module_param_sysfs_setup() 781 sysfs_remove_group(&mod->mkobj.kobj, &mod->mkobj.mp->grp); in module_param_sysfs_remove() 801 struct kobject *kobj; in locate_module_kobject() local 804 kobj = kset_find_obj(module_kset, name); in locate_module_kobject() 805 if (kobj) { in locate_module_kobject() 806 mk = to_module_kobject(kobj); in locate_module_kobject() 812 mk->kobj.kset = module_kset; in locate_module_kobject() 813 err = kobject_init_and_add(&mk->kobj, &module_ktype, NULL, in locate_module_kobject() 817 err = sysfs_create_file(&mk->kobj, &module_uevent.attr); in locate_module_kobject() [all …]
|
/linux-4.4.14/arch/x86/kernel/ |
D | ksysfs.c | 23 static ssize_t version_show(struct kobject *kobj, in version_show() argument 31 static ssize_t boot_params_data_read(struct file *fp, struct kobject *kobj, in boot_params_data_read() argument 63 static int kobj_to_setup_data_nr(struct kobject *kobj, int *nr) in kobj_to_setup_data_nr() argument 67 name = kobject_name(kobj); in kobj_to_setup_data_nr() 116 static ssize_t type_show(struct kobject *kobj, in type_show() argument 123 ret = kobj_to_setup_data_nr(kobj, &nr); in type_show() 140 struct kobject *kobj, in setup_data_data_read() argument 150 ret = kobj_to_setup_data_nr(kobj, &nr); in setup_data_data_read() 215 struct kobject *kobj; in create_setup_data_node() local 219 kobj = kobject_create_and_add(name, parent); in create_setup_data_node() [all …]
|
/linux-4.4.14/drivers/platform/mips/ |
D | cpu_hwmon.c | 106 static int create_sysfs_cputemp_files(struct kobject *kobj) in create_sysfs_cputemp_files() argument 110 ret = sysfs_create_files(kobj, hwmon_cputemp1); in create_sysfs_cputemp_files() 117 ret = sysfs_create_files(kobj, hwmon_cputemp2); in create_sysfs_cputemp_files() 124 sysfs_remove_files(kobj, hwmon_cputemp1); in create_sysfs_cputemp_files() 130 static void remove_sysfs_cputemp_files(struct kobject *kobj) in remove_sysfs_cputemp_files() argument 132 sysfs_remove_files(&cpu_hwmon_dev->kobj, hwmon_cputemp1); in remove_sysfs_cputemp_files() 135 sysfs_remove_files(&cpu_hwmon_dev->kobj, hwmon_cputemp2); in remove_sysfs_cputemp_files() 163 ret = sysfs_create_group(&cpu_hwmon_dev->kobj, in loongson_hwmon_init() 170 ret = create_sysfs_cputemp_files(&cpu_hwmon_dev->kobj); in loongson_hwmon_init() 182 sysfs_remove_group(&cpu_hwmon_dev->kobj, in loongson_hwmon_init() [all …]
|
/linux-4.4.14/drivers/staging/lustre/lustre/llite/ |
D | lproc_llite.c | 51 static ssize_t blocksize_show(struct kobject *kobj, struct attribute *attr, in blocksize_show() argument 54 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, in blocksize_show() 69 static ssize_t kbytestotal_show(struct kobject *kobj, struct attribute *attr, in kbytestotal_show() argument 72 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, in kbytestotal_show() 94 static ssize_t kbytesfree_show(struct kobject *kobj, struct attribute *attr, in kbytesfree_show() argument 97 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, in kbytesfree_show() 119 static ssize_t kbytesavail_show(struct kobject *kobj, struct attribute *attr, in kbytesavail_show() argument 122 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, in kbytesavail_show() 144 static ssize_t filestotal_show(struct kobject *kobj, struct attribute *attr, in filestotal_show() argument 147 struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, in filestotal_show() [all …]
|
/linux-4.4.14/sound/hda/ |
D | hdac_sysfs.c | 95 static int get_codec_nid(struct kobject *kobj, struct hdac_device **codecp) in get_codec_nid() argument 97 struct device *dev = kobj_to_dev(kobj->parent->parent); in get_codec_nid() 101 ret = kstrtoint(kobj->name, 16, &nid); in get_codec_nid() 108 static ssize_t widget_attr_show(struct kobject *kobj, struct attribute *attr, in widget_attr_show() argument 118 nid = get_codec_nid(kobj, &codec); in widget_attr_show() 124 static ssize_t widget_attr_store(struct kobject *kobj, struct attribute *attr, in widget_attr_store() argument 134 nid = get_codec_nid(kobj, &codec); in widget_attr_store() 145 static void widget_release(struct kobject *kobj) in widget_release() argument 147 kfree(kobj); in widget_release() 310 static void free_widget_node(struct kobject *kobj, in free_widget_node() argument [all …]
|
/linux-4.4.14/samples/kobject/ |
D | kset-example.c | 32 struct kobject kobj; member 37 #define to_foo_obj(x) container_of(x, struct foo_obj, kobj) 54 static ssize_t foo_attr_show(struct kobject *kobj, in foo_attr_show() argument 62 foo = to_foo_obj(kobj); in foo_attr_show() 74 static ssize_t foo_attr_store(struct kobject *kobj, in foo_attr_store() argument 82 foo = to_foo_obj(kobj); in foo_attr_store() 103 static void foo_release(struct kobject *kobj) in foo_release() argument 107 foo = to_foo_obj(kobj); in foo_release() 214 foo->kobj.kset = example_kset; in create_foo_obj() 222 retval = kobject_init_and_add(&foo->kobj, &foo_ktype, NULL, "%s", name); in create_foo_obj() [all …]
|
D | kobject-example.c | 30 static ssize_t foo_show(struct kobject *kobj, struct kobj_attribute *attr, in foo_show() argument 36 static ssize_t foo_store(struct kobject *kobj, struct kobj_attribute *attr, in foo_store() argument 56 static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr, in b_show() argument 68 static ssize_t b_store(struct kobject *kobj, struct kobj_attribute *attr, in b_store() argument
|
/linux-4.4.14/arch/ia64/kernel/ |
D | topology.c | 129 struct kobject kobj; member 135 struct kobject kobj; member 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) in ia64_cache_show() argument 279 struct cache_info *this_leaf = to_object(kobj); in ia64_cache_show() 304 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); in cpu_cache_sysfs_exit() 346 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); in cpu_cache_sysfs_init() 360 if (all_cpu_cache_info[cpu].kobj.parent) in cache_add_dev() 373 retval = kobject_init_and_add(&all_cpu_cache_info[cpu].kobj, in cache_add_dev() 374 &cache_ktype_percpu_entry, &sys_dev->kobj, in cache_add_dev() [all …]
|
/linux-4.4.14/drivers/gpu/drm/ttm/ |
D | ttm_memory.c | 43 struct kobject kobj; member 74 static void ttm_mem_zone_kobj_release(struct kobject *kobj) in ttm_mem_zone_kobj_release() argument 77 container_of(kobj, struct ttm_mem_zone, kobj); in ttm_mem_zone_kobj_release() 84 static ssize_t ttm_mem_zone_show(struct kobject *kobj, in ttm_mem_zone_show() argument 89 container_of(kobj, struct ttm_mem_zone, kobj); in ttm_mem_zone_show() 111 static ssize_t ttm_mem_zone_store(struct kobject *kobj, in ttm_mem_zone_store() argument 117 container_of(kobj, struct ttm_mem_zone, kobj); in ttm_mem_zone_store() 169 static void ttm_mem_global_kobj_release(struct kobject *kobj) in ttm_mem_global_kobj_release() argument 172 container_of(kobj, struct ttm_mem_global, kobj); in ttm_mem_global_kobj_release() 267 &zone->kobj, &ttm_mem_zone_kobj_type, &glob->kobj, zone->name); in ttm_mem_init_kernel_zone() [all …]
|
D | ttm_module.c | 60 struct kobject *kobj = &ttm_drm_class_device.kobj; in ttm_get_kobj() local 61 BUG_ON(kobj == NULL); in ttm_get_kobj() 62 return kobj; in ttm_get_kobj()
|
D | ttm_page_alloc.c | 111 struct kobject kobj; member 146 static void ttm_pool_kobj_release(struct kobject *kobj) in ttm_pool_kobj_release() argument 149 container_of(kobj, struct ttm_pool_manager, kobj); in ttm_pool_kobj_release() 153 static ssize_t ttm_pool_store(struct kobject *kobj, in ttm_pool_store() argument 157 container_of(kobj, struct ttm_pool_manager, kobj); in ttm_pool_store() 187 static ssize_t ttm_pool_show(struct kobject *kobj, in ttm_pool_show() argument 191 container_of(kobj, struct ttm_pool_manager, kobj); in ttm_pool_show() 836 ret = kobject_init_and_add(&_manager->kobj, &ttm_pool_kobj_type, in ttm_page_alloc_init() 837 &glob->kobj, "pool"); in ttm_page_alloc_init() 839 kobject_put(&_manager->kobj); in ttm_page_alloc_init() [all …]
|
D | ttm_page_alloc_dma.c | 175 struct kobject kobj; member 200 static void ttm_pool_kobj_release(struct kobject *kobj) in ttm_pool_kobj_release() argument 203 container_of(kobj, struct ttm_pool_manager, kobj); in ttm_pool_kobj_release() 207 static ssize_t ttm_pool_store(struct kobject *kobj, struct attribute *attr, in ttm_pool_store() argument 211 container_of(kobj, struct ttm_pool_manager, kobj); in ttm_pool_store() 241 static ssize_t ttm_pool_show(struct kobject *kobj, struct attribute *attr, in ttm_pool_show() argument 245 container_of(kobj, struct ttm_pool_manager, kobj); in ttm_pool_show() 1100 ret = kobject_init_and_add(&_manager->kobj, &ttm_pool_kobj_type, in ttm_dma_page_alloc_init() 1101 &glob->kobj, "dma_pool"); in ttm_dma_page_alloc_init() 1103 kobject_put(&_manager->kobj); in ttm_dma_page_alloc_init() [all …]
|
/linux-4.4.14/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() 336 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.4.14/drivers/firmware/ |
D | memmap.c | 44 struct kobject kobj; /* kobject for each entry */ member 50 static ssize_t memmap_attr_show(struct kobject *kobj, 101 to_memmap_entry(struct kobject *kobj) in to_memmap_entry() argument 103 return container_of(kobj, struct firmware_map_entry, kobj); in to_memmap_entry() 106 static void __meminit release_firmware_map_entry(struct kobject *kobj) in release_firmware_map_entry() argument 108 struct firmware_map_entry *entry = to_memmap_entry(kobj); in release_firmware_map_entry() 160 kobject_init(&entry->kobj, &memmap_ktype); in firmware_map_add_entry() 189 if (entry->kobj.state_in_sysfs) in add_sysfs_fw_map_entry() 198 entry->kobj.kset = mmap_kset; in add_sysfs_fw_map_entry() 199 if (kobject_add(&entry->kobj, NULL, "%d", map_entries_nr++)) in add_sysfs_fw_map_entry() [all …]
|
D | dmi-sysfs.c | 34 struct kobject kobj; member 81 static void dmi_entry_free(struct kobject *kobj) in dmi_entry_free() argument 83 kfree(kobj); in dmi_entry_free() 86 static struct dmi_sysfs_entry *to_entry(struct kobject *kobj) in to_entry() argument 88 return container_of(kobj, struct dmi_sysfs_entry, kobj); in to_entry() 96 static ssize_t dmi_sysfs_attr_show(struct kobject *kobj, in dmi_sysfs_attr_show() argument 99 struct dmi_sysfs_entry *entry = to_entry(kobj); in dmi_sysfs_attr_show() 213 static ssize_t dmi_entry_attr_show(struct kobject *kobj, in dmi_entry_attr_show() argument 223 return find_dmi_entry(to_entry(kobj->parent), in dmi_entry_attr_show() 428 static ssize_t dmi_sel_raw_read(struct file *filp, struct kobject *kobj, in dmi_sel_raw_read() argument [all …]
|
D | dell_rbu.c | 525 static ssize_t read_rbu_data(struct file *filp, struct kobject *kobj, in read_rbu_data() argument 579 static ssize_t read_rbu_image_type(struct file *filp, struct kobject *kobj, in read_rbu_image_type() argument 589 static ssize_t write_rbu_image_type(struct file *filp, struct kobject *kobj, in write_rbu_image_type() argument 650 static ssize_t read_rbu_packet_size(struct file *filp, struct kobject *kobj, in read_rbu_packet_size() argument 663 static ssize_t write_rbu_packet_size(struct file *filp, struct kobject *kobj, in write_rbu_packet_size() argument 709 rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_data_attr); in dcdrbu_init() 712 rc = sysfs_create_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr); in dcdrbu_init() 715 rc = sysfs_create_bin_file(&rbu_device->dev.kobj, in dcdrbu_init() 724 sysfs_remove_bin_file(&rbu_device->dev.kobj, &rbu_image_type_attr); in dcdrbu_init() 726 sysfs_remove_bin_file(&rbu_device->dev.kobj, &rbu_data_attr); in dcdrbu_init()
|
D | edd.c | 60 struct kobject kobj; member 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) in edd_attr_show() argument 116 struct edd_device *dev = to_edd_device(kobj); in edd_attr_show() 622 static void edd_release(struct kobject * kobj) in edd_release() argument 624 struct edd_device * dev = to_edd_device(kobj); in edd_release() 688 ret = sysfs_create_link(&edev->kobj,&pci_dev->dev.kobj,"pci_dev"); in edd_create_symlink_to_pcidev() 696 kobject_put(&edev->kobj); in edd_device_unregister() 708 error = sysfs_create_file(&edev->kobj,&attr->attr); in edd_populate_dir() 724 edev->kobj.kset = edd_kset; in edd_device_register() [all …]
|
/linux-4.4.14/block/ |
D | blk-mq-sysfs.c | 16 static void blk_mq_sysfs_release(struct kobject *kobj) in blk_mq_sysfs_release() argument 32 static ssize_t blk_mq_sysfs_show(struct kobject *kobj, struct attribute *attr, in blk_mq_sysfs_show() argument 41 ctx = container_of(kobj, struct blk_mq_ctx, kobj); in blk_mq_sysfs_show() 55 static ssize_t blk_mq_sysfs_store(struct kobject *kobj, struct attribute *attr, in blk_mq_sysfs_store() argument 64 ctx = container_of(kobj, struct blk_mq_ctx, kobj); in blk_mq_sysfs_store() 78 static ssize_t blk_mq_hw_sysfs_show(struct kobject *kobj, in blk_mq_hw_sysfs_show() argument 87 hctx = container_of(kobj, struct blk_mq_hw_ctx, kobj); in blk_mq_hw_sysfs_show() 101 static ssize_t blk_mq_hw_sysfs_store(struct kobject *kobj, in blk_mq_hw_sysfs_store() argument 111 hctx = container_of(kobj, struct blk_mq_hw_ctx, kobj); in blk_mq_hw_sysfs_store() 356 kobject_del(&ctx->kobj); in blk_mq_unregister_hctx() [all …]
|
D | blk-sysfs.c | 513 queue_attr_show(struct kobject *kobj, struct attribute *attr, char *page) in queue_attr_show() argument 517 container_of(kobj, struct request_queue, kobj); in queue_attr_show() 533 queue_attr_store(struct kobject *kobj, struct attribute *attr, in queue_attr_store() argument 543 q = container_of(kobj, struct request_queue, kobj); in queue_attr_store() 576 static void blk_release_queue(struct kobject *kobj) in blk_release_queue() argument 579 container_of(kobj, struct request_queue, kobj); in blk_release_queue() 649 ret = kobject_add(&q->kobj, kobject_get(&dev->kobj), "%s", "queue"); in blk_register_queue() 655 kobject_uevent(&q->kobj, KOBJ_ADD); in blk_register_queue() 665 kobject_uevent(&q->kobj, KOBJ_REMOVE); in blk_register_queue() 666 kobject_del(&q->kobj); in blk_register_queue() [all …]
|
D | elevator.c | 163 kobject_init(&eq->kobj, &elv_ktype); in elevator_alloc() 171 static void elevator_release(struct kobject *kobj) in elevator_release() argument 175 e = container_of(kobj, struct elevator_queue, kobj); in elevator_release() 241 kobject_put(&e->kobj); in elevator_exit() 748 elv_attr_show(struct kobject *kobj, struct attribute *attr, char *page) in elv_attr_show() argument 757 e = container_of(kobj, struct elevator_queue, kobj); in elv_attr_show() 765 elv_attr_store(struct kobject *kobj, struct attribute *attr, in elv_attr_store() argument 775 e = container_of(kobj, struct elevator_queue, kobj); in elv_attr_store() 797 error = kobject_add(&e->kobj, &q->kobj, "%s", "iosched"); in elv_register_queue() 802 if (sysfs_create_file(&e->kobj, &attr->attr)) in elv_register_queue() [all …]
|
D | genhd.c | 496 return &disk_to_dev(p)->kobj; in exact_match() 526 err = sysfs_create_link(block_depr, &ddev->kobj, in register_disk() 527 kobject_name(&ddev->kobj)); in register_disk() 541 disk->part0.holder_dir = kobject_create_and_add("holders", &ddev->kobj); in register_disk() 542 disk->slave_dir = kobject_create_and_add("slaves", &ddev->kobj); in register_disk() 565 kobject_uevent(&ddev->kobj, KOBJ_ADD); in register_disk() 570 kobject_uevent(&part_to_dev(part)->kobj, KOBJ_ADD); in register_disk() 628 retval = sysfs_create_link(&disk_to_dev(disk)->kobj, &bdi->dev->kobj, in add_disk() 658 sysfs_remove_link(&disk_to_dev(disk)->kobj, "bdi"); in del_gendisk() 688 struct kobject *kobj; in get_gendisk() local [all …]
|
/linux-4.4.14/kernel/power/ |
D | main.c | 51 static ssize_t pm_async_show(struct kobject *kobj, struct kobj_attribute *attr, in pm_async_show() argument 57 static ssize_t pm_async_store(struct kobject *kobj, struct kobj_attribute *attr, in pm_async_store() argument 86 static ssize_t pm_test_show(struct kobject *kobj, struct kobj_attribute *attr, in pm_test_show() argument 107 static ssize_t pm_test_store(struct kobject *kobj, struct kobj_attribute *attr, in pm_test_store() argument 247 static ssize_t pm_print_times_show(struct kobject *kobj, in pm_print_times_show() argument 253 static ssize_t pm_print_times_store(struct kobject *kobj, in pm_print_times_store() argument 276 static ssize_t pm_wakeup_irq_show(struct kobject *kobj, in pm_wakeup_irq_show() argument 283 static ssize_t pm_wakeup_irq_store(struct kobject *kobj, in pm_wakeup_irq_store() argument 307 static ssize_t state_show(struct kobject *kobj, struct kobj_attribute *attr, in state_show() argument 354 static ssize_t state_store(struct kobject *kobj, struct kobj_attribute *attr, in state_store() argument [all …]
|
D | hibernate.c | 909 static ssize_t disk_show(struct kobject *kobj, struct kobj_attribute *attr, in disk_show() argument 943 static ssize_t disk_store(struct kobject *kobj, struct kobj_attribute *attr, in disk_store() argument 993 static ssize_t resume_show(struct kobject *kobj, struct kobj_attribute *attr, in resume_show() argument 1000 static ssize_t resume_store(struct kobject *kobj, struct kobj_attribute *attr, in resume_store() argument 1029 static ssize_t image_size_show(struct kobject *kobj, struct kobj_attribute *attr, in image_size_show() argument 1035 static ssize_t image_size_store(struct kobject *kobj, struct kobj_attribute *attr, in image_size_store() argument 1050 static ssize_t reserved_size_show(struct kobject *kobj, in reserved_size_show() argument 1056 static ssize_t reserved_size_store(struct kobject *kobj, in reserved_size_store() argument
|
/linux-4.4.14/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 = container_of(kobj, struct device, 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 = container_of(kobj, struct device, 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()
|
D | hid-roccat-pyra.c | 89 static ssize_t pyra_sysfs_read(struct file *fp, struct kobject *kobj, in pyra_sysfs_read() argument 94 container_of(kobj, struct device, kobj)->parent->parent; in pyra_sysfs_read() 115 static ssize_t pyra_sysfs_write(struct file *fp, struct kobject *kobj, in pyra_sysfs_write() argument 120 container_of(kobj, struct device, kobj)->parent->parent; in 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, in pyra_sysfs_read_profilex_settings() argument 195 container_of(kobj, struct device, kobj)->parent->parent; in pyra_sysfs_read_profilex_settings() [all …]
|
D | hid-roccat-koneplus.c | 86 static ssize_t koneplus_sysfs_read(struct file *fp, struct kobject *kobj, in koneplus_sysfs_read() argument 91 container_of(kobj, struct device, kobj)->parent->parent; in koneplus_sysfs_read() 112 static ssize_t koneplus_sysfs_write(struct file *fp, struct kobject *kobj, in koneplus_sysfs_write() argument 117 container_of(kobj, struct device, kobj)->parent->parent; in 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, in koneplus_sysfs_read_profilex_settings() argument 197 container_of(kobj, struct device, kobj)->parent->parent; in koneplus_sysfs_read_profilex_settings() [all …]
|
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, \
|
D | hid-roccat-kovaplus.c | 127 static ssize_t kovaplus_sysfs_read(struct file *fp, struct kobject *kobj, in kovaplus_sysfs_read() argument 132 container_of(kobj, struct device, kobj)->parent->parent; in kovaplus_sysfs_read() 153 static ssize_t kovaplus_sysfs_write(struct file *fp, struct kobject *kobj, in kovaplus_sysfs_write() argument 158 container_of(kobj, struct device, kobj)->parent->parent; in 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, in kovaplus_sysfs_read_profilex_settings() argument 225 container_of(kobj, struct device, kobj)->parent->parent; in kovaplus_sysfs_read_profilex_settings() [all …]
|
D | hid-roccat-common.c | 133 ssize_t roccat_common2_sysfs_read(struct file *fp, struct kobject *kobj, in roccat_common2_sysfs_read() argument 138 container_of(kobj, struct device, kobj)->parent->parent; in roccat_common2_sysfs_read() 157 ssize_t roccat_common2_sysfs_write(struct file *fp, struct kobject *kobj, in roccat_common2_sysfs_write() argument 162 container_of(kobj, struct device, kobj)->parent->parent; in roccat_common2_sysfs_write()
|
D | hid-roccat-isku.c | 120 static ssize_t isku_sysfs_read(struct file *fp, struct kobject *kobj, in isku_sysfs_read() argument 125 container_of(kobj, struct device, kobj)->parent->parent; in isku_sysfs_read() 143 static ssize_t isku_sysfs_write(struct file *fp, struct kobject *kobj, in isku_sysfs_write() argument 148 container_of(kobj, struct device, kobj)->parent->parent; in 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, \
|
D | hid-roccat-arvo.c | 191 struct kobject *kobj, void const *buf, in arvo_sysfs_write() argument 195 container_of(kobj, struct device, kobj)->parent->parent; in arvo_sysfs_write() 211 struct kobject *kobj, void *buf, loff_t off, in arvo_sysfs_read() argument 215 container_of(kobj, struct device, kobj)->parent->parent; in arvo_sysfs_read() 234 struct kobject *kobj, struct bin_attribute *attr, char *buf, in arvo_sysfs_write_button() argument 237 return arvo_sysfs_write(fp, kobj, buf, off, count, in arvo_sysfs_write_button() 244 struct kobject *kobj, struct bin_attribute *attr, char *buf, in arvo_sysfs_read_info() argument 247 return arvo_sysfs_read(fp, kobj, buf, off, count, in arvo_sysfs_read_info()
|
D | hid-roccat-kone.c | 269 static ssize_t kone_sysfs_read_settings(struct file *fp, struct kobject *kobj, in kone_sysfs_read_settings() argument 273 container_of(kobj, struct device, kobj)->parent->parent; in kone_sysfs_read_settings() 294 static ssize_t kone_sysfs_write_settings(struct file *fp, struct kobject *kobj, in kone_sysfs_write_settings() argument 298 container_of(kobj, struct device, kobj)->parent->parent; in kone_sysfs_write_settings() 333 struct kobject *kobj, struct bin_attribute *attr, in kone_sysfs_read_profilex() argument 336 container_of(kobj, struct device, kobj)->parent->parent; in kone_sysfs_read_profilex() 354 struct kobject *kobj, struct bin_attribute *attr, in kone_sysfs_write_profilex() argument 357 container_of(kobj, struct device, kobj)->parent->parent; in kone_sysfs_write_profilex()
|
/linux-4.4.14/drivers/iommu/ |
D | iommu-sysfs.c | 77 ret = kobject_set_name_vargs(&dev->kobj, fmt, vargs); in iommu_device_create() 114 ret = sysfs_add_link_to_group(&dev->kobj, "devices", in iommu_device_link() 115 &link->kobj, dev_name(link)); in iommu_device_link() 119 ret = sysfs_create_link_nowarn(&link->kobj, &dev->kobj, "iommu"); in iommu_device_link() 121 sysfs_remove_link_from_group(&dev->kobj, "devices", in iommu_device_link() 132 sysfs_remove_link(&link->kobj, "iommu"); in iommu_device_unlink() 133 sysfs_remove_link_from_group(&dev->kobj, "devices", dev_name(link)); in iommu_device_unlink()
|
D | iommu.c | 45 struct kobject kobj; member 78 container_of(_kobj, struct iommu_group, kobj) 89 static ssize_t iommu_group_attr_show(struct kobject *kobj, in iommu_group_attr_show() argument 93 struct iommu_group *group = to_iommu_group(kobj); in iommu_group_attr_show() 101 static ssize_t iommu_group_attr_store(struct kobject *kobj, in iommu_group_attr_store() argument 106 struct iommu_group *group = to_iommu_group(kobj); in iommu_group_attr_store() 122 return sysfs_create_file(&group->kobj, &attr->attr); in iommu_group_create_file() 128 sysfs_remove_file(&group->kobj, &attr->attr); in iommu_group_remove_file() 138 static void iommu_group_release(struct kobject *kobj) in iommu_group_release() argument 140 struct iommu_group *group = to_iommu_group(kobj); in iommu_group_release() [all …]
|
/linux-4.4.14/drivers/md/bcache/ |
D | stats.c | 55 container_of(kobj, struct cache_stats, kobj); in SHOW() 98 int ret = kobject_add(&acc->total.kobj, parent, in bch_cache_accounting_add_kobjs() 100 ret = ret ?: kobject_add(&acc->five_minute.kobj, parent, in bch_cache_accounting_add_kobjs() 102 ret = ret ?: kobject_add(&acc->hour.kobj, parent, in bch_cache_accounting_add_kobjs() 104 ret = ret ?: kobject_add(&acc->day.kobj, parent, in bch_cache_accounting_add_kobjs() 118 kobject_put(&acc->total.kobj); in bch_cache_accounting_destroy() 119 kobject_put(&acc->five_minute.kobj); in bch_cache_accounting_destroy() 120 kobject_put(&acc->hour.kobj); in bch_cache_accounting_destroy() 121 kobject_put(&acc->day.kobj); in bch_cache_accounting_destroy() 230 kobject_init(&acc->total.kobj, &bch_stats_ktype); in bch_cache_accounting_init() [all …]
|
D | sysfs.c | 111 struct cached_dev *dc = container_of(kobj, struct cached_dev, in SHOW() 112 disk.kobj); in SHOW() 192 struct cached_dev *dc = container_of(kobj, struct cached_dev, in STORE() 193 disk.kobj); in STORE() 261 &disk_to_dev(dc->disk.disk)->kobj, KOBJ_CHANGE, env->envp); in STORE() 290 struct cached_dev *dc = container_of(kobj, struct cached_dev, in STORE() 291 disk.kobj); in STORE() 294 size = __cached_dev_store(kobj, attr, buf, size); in STORE() 343 struct bcache_device *d = container_of(kobj, struct bcache_device, in SHOW() 344 kobj); in SHOW() [all …]
|
D | super.c | 665 sysfs_remove_link(&d->c->kobj, d->name); in bcache_device_unlink() 666 sysfs_remove_link(&d->kobj, "cache"); in bcache_device_unlink() 685 WARN(sysfs_create_link(&d->kobj, &c->kobj, "cache") || in bcache_device_link() 686 sysfs_create_link(&c->kobj, &d->kobj, d->name), in bcache_device_link() 872 kobject_uevent_env(&disk_to_dev(d->disk)->kobj, KOBJ_CHANGE, env); in bch_cached_dev_run() 876 if (sysfs_create_link(&d->kobj, &disk_to_dev(d->disk)->kobj, "dev") || in bch_cached_dev_run() 877 sysfs_create_link(&disk_to_dev(d->disk)->kobj, &d->kobj, "bcache")) in bch_cached_dev_run() 1044 void bch_cached_dev_release(struct kobject *kobj) in bch_cached_dev_release() argument 1046 struct cached_dev *dc = container_of(kobj, struct cached_dev, in bch_cached_dev_release() 1047 disk.kobj); in bch_cached_dev_release() [all …]
|
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); \
|
/linux-4.4.14/drivers/platform/chrome/ |
D | cros_ec_vbc.c | 27 static ssize_t vboot_context_read(struct file *filp, struct kobject *kobj, in vboot_context_read() argument 31 struct device *dev = container_of(kobj, struct device, kobj); in vboot_context_read() 68 static ssize_t vboot_context_write(struct file *filp, struct kobject *kobj, in vboot_context_write() argument 72 struct device *dev = container_of(kobj, struct device, kobj); in vboot_context_write() 110 static umode_t cros_ec_vbc_is_visible(struct kobject *kobj, in cros_ec_vbc_is_visible() argument 113 struct device *dev = container_of(kobj, struct device, kobj); in cros_ec_vbc_is_visible()
|
/linux-4.4.14/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() 122 sysfs_remove_link(&rc->uwb_dev.dev.kobj, pal->name); in uwb_pal_unregister() 125 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); in uwb_pal_unregister()
|
/linux-4.4.14/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()
|
D | i2c-mux.c | 198 WARN(sysfs_create_link(&priv->adap.dev.kobj, &mux_dev->kobj, "mux_device"), in i2c_add_mux_adapter() 202 WARN(sysfs_create_link(&mux_dev->kobj, &priv->adap.dev.kobj, symlink_name), in i2c_add_mux_adapter() 217 sysfs_remove_link(&priv->mux_dev->kobj, symlink_name); in i2c_del_mux_adapter() 219 sysfs_remove_link(&priv->adap.dev.kobj, "mux_device"); in i2c_del_mux_adapter()
|
/linux-4.4.14/drivers/scsi/ |
D | iscsi_boot_sysfs.c | 40 static ssize_t iscsi_boot_show_attribute(struct kobject *kobj, in iscsi_boot_show_attribute() argument 44 container_of(kobj, struct iscsi_boot_kobj, kobj); in iscsi_boot_show_attribute() 62 static void iscsi_boot_kobj_release(struct kobject *kobj) in iscsi_boot_kobj_release() argument 65 container_of(kobj, struct iscsi_boot_kobj, kobj); in iscsi_boot_kobj_release() 115 static umode_t iscsi_boot_tgt_attr_is_visible(struct kobject *kobj, in iscsi_boot_tgt_attr_is_visible() argument 119 container_of(kobj, struct iscsi_boot_kobj, kobj); in iscsi_boot_tgt_attr_is_visible() 196 static umode_t iscsi_boot_eth_attr_is_visible(struct kobject *kobj, in iscsi_boot_eth_attr_is_visible() argument 200 container_of(kobj, struct iscsi_boot_kobj, kobj); in iscsi_boot_eth_attr_is_visible() 268 static umode_t iscsi_boot_ini_attr_is_visible(struct kobject *kobj, in iscsi_boot_ini_attr_is_visible() argument 272 container_of(kobj, struct iscsi_boot_kobj, kobj); in iscsi_boot_ini_attr_is_visible() [all …]
|
/linux-4.4.14/drivers/dma/ioat/ |
D | sysfs.c | 54 ioat_attr_show(struct kobject *kobj, struct attribute *attr, char *page) in ioat_attr_show() argument 60 ioat_chan = container_of(kobj, struct ioatdma_chan, kobj); in ioat_attr_show() 78 struct kobject *parent = &c->dev->device.kobj; in ioat_kobject_add() 81 err = kobject_init_and_add(&ioat_chan->kobj, type, in ioat_kobject_add() 86 kobject_put(&ioat_chan->kobj); in ioat_kobject_add() 101 kobject_del(&ioat_chan->kobj); in ioat_kobject_del() 102 kobject_put(&ioat_chan->kobj); in ioat_kobject_del()
|
/linux-4.4.14/drivers/misc/cxl/ |
D | sysfs.c | 385 static ssize_t afu_eb_read(struct file *filp, struct kobject *kobj, in afu_eb_read() argument 389 struct cxl_afu *afu = to_cxl_afu(container_of(kobj, in afu_eb_read() 390 struct device, kobj)); in afu_eb_read() 430 struct kobject kobj; member 439 #define to_cr(obj) container_of(obj, struct afu_config_record, kobj) 441 static ssize_t vendor_show(struct kobject *kobj, in vendor_show() argument 444 struct afu_config_record *cr = to_cr(kobj); in vendor_show() 449 static ssize_t device_show(struct kobject *kobj, in device_show() argument 452 struct afu_config_record *cr = to_cr(kobj); in device_show() 457 static ssize_t class_show(struct kobject *kobj, in class_show() argument [all …]
|
/linux-4.4.14/drivers/scsi/arcmsr/ |
D | arcmsr_attr.c | 64 struct kobject *kobj, in arcmsr_sysfs_iop_message_read() argument 69 struct device *dev = container_of(kobj,struct device,kobj); in arcmsr_sysfs_iop_message_read() 111 struct kobject *kobj, in arcmsr_sysfs_iop_message_write() argument 116 struct device *dev = container_of(kobj,struct device,kobj); in arcmsr_sysfs_iop_message_write() 159 struct kobject *kobj, in arcmsr_sysfs_iop_message_clear() argument 164 struct device *dev = container_of(kobj,struct device,kobj); in arcmsr_sysfs_iop_message_clear() 225 error = sysfs_create_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_read_attr); in arcmsr_alloc_sysfs_attr() 230 error = sysfs_create_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_write_attr); in arcmsr_alloc_sysfs_attr() 235 error = sysfs_create_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_clear_attr); in arcmsr_alloc_sysfs_attr() 242 sysfs_remove_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_write_attr); in arcmsr_alloc_sysfs_attr() [all …]
|
/linux-4.4.14/drivers/net/bonding/ |
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, in slave_show() argument 132 struct slave *slave = to_slave(kobj); in slave_show() 152 err = kobject_init_and_add(&slave->kobj, &slave_ktype, in bond_sysfs_slave_add() 153 &(slave->dev->dev.kobj), "bonding_slave"); in bond_sysfs_slave_add() 158 err = sysfs_create_file(&slave->kobj, &((*a)->attr)); in bond_sysfs_slave_add() 160 kobject_put(&slave->kobj); in bond_sysfs_slave_add() 173 sysfs_remove_file(&slave->kobj, &((*a)->attr)); in bond_sysfs_slave_del() 175 kobject_put(&slave->kobj); in bond_sysfs_slave_del()
|
/linux-4.4.14/drivers/md/ |
D | dm-sysfs.c | 21 static ssize_t dm_attr_show(struct kobject *kobj, struct attribute *attr, in dm_attr_show() argument 32 md = dm_get_from_kobject(kobj); in dm_attr_show() 46 static ssize_t dm_attr_store(struct kobject *kobj, struct attribute *attr, in dm_attr_store() argument 57 md = dm_get_from_kobject(kobj); in dm_attr_store() 132 &disk_to_dev(dm_disk(md))->kobj, in dm_sysfs_init() 141 struct kobject *kobj = dm_kobject(md); in dm_sysfs_exit() local 142 kobject_put(kobj); in dm_sysfs_exit() 143 wait_for_completion(dm_get_completion_from_kobject(kobj)); in dm_sysfs_exit()
|
D | dm.h | 163 struct kobject kobj; member 167 static inline struct completion *dm_get_completion_from_kobject(struct kobject *kobj) in dm_get_completion_from_kobject() argument 169 return &container_of(kobj, struct dm_kobject_holder, kobj)->completion; in dm_get_completion_from_kobject() 175 struct mapped_device *dm_get_from_kobject(struct kobject *kobj); 180 void dm_kobject_release(struct kobject *kobj);
|
D | dm-builtin.c | 43 void dm_kobject_release(struct kobject *kobj) in dm_kobject_release() argument 45 complete(dm_get_completion_from_kobject(kobj)); in dm_kobject_release()
|
D | dm-uevent.h | 33 extern void dm_send_uevents(struct list_head *events, struct kobject *kobj); 48 struct kobject *kobj) in dm_send_uevents() argument
|
D | md.h | 65 struct kobject kobj; member 249 struct kobject kobj; member 571 mddev->kobj.sd) { in sysfs_link_rdev() 573 return sysfs_create_link(&mddev->kobj, &rdev->kobj, nm); in sysfs_link_rdev() 583 mddev->kobj.sd) { in sysfs_unlink_rdev() 585 sysfs_remove_link(&mddev->kobj, nm); in sysfs_unlink_rdev()
|
/linux-4.4.14/drivers/net/ethernet/qlogic/qlcnic/ |
D | qlcnic_sysfs.c | 268 static ssize_t qlcnic_sysfs_read_crb(struct file *filp, struct kobject *kobj, in qlcnic_sysfs_read_crb() argument 272 struct device *dev = container_of(kobj, struct device, kobj); in qlcnic_sysfs_read_crb() 285 static ssize_t qlcnic_sysfs_write_crb(struct file *filp, struct kobject *kobj, in qlcnic_sysfs_write_crb() argument 289 struct device *dev = container_of(kobj, struct device, kobj); in qlcnic_sysfs_write_crb() 314 static ssize_t qlcnic_sysfs_read_mem(struct file *filp, struct kobject *kobj, in qlcnic_sysfs_read_mem() argument 318 struct device *dev = container_of(kobj, struct device, kobj); in qlcnic_sysfs_read_mem() 336 static ssize_t qlcnic_sysfs_write_mem(struct file *filp, struct kobject *kobj, in qlcnic_sysfs_write_mem() argument 340 struct device *dev = container_of(kobj, struct device, kobj); in qlcnic_sysfs_write_mem() 400 struct kobject *kobj, in qlcnic_sysfs_write_pm_config() argument 405 struct device *dev = container_of(kobj, struct device, kobj); in qlcnic_sysfs_write_pm_config() [all …]
|
/linux-4.4.14/arch/x86/kernel/cpu/mcheck/ |
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) in show() argument 537 struct threshold_block *b = to_block(kobj); in show() 546 static ssize_t store(struct kobject *kobj, struct attribute *attr, in store() argument 549 struct threshold_block *b = to_block(kobj); in store() 620 err = kobject_init_and_add(&b->kobj, &threshold_ktype, in allocate_threshold_blocks() 621 per_cpu(threshold_banks, cpu)[bank]->kobj, in allocate_threshold_blocks() 640 kobject_uevent(&b->kobj, KOBJ_ADD); in allocate_threshold_blocks() 646 kobject_put(&b->kobj); in allocate_threshold_blocks() 660 err = kobject_add(&b->blocks->kobj, b->kobj, b->blocks->kobj.name); in __threshold_add_blocks() [all …]
|
/linux-4.4.14/drivers/misc/ |
D | ds1682.c | 141 static ssize_t ds1682_eeprom_read(struct file *filp, struct kobject *kobj, in ds1682_eeprom_read() argument 145 struct i2c_client *client = kobj_to_i2c_client(kobj); in ds1682_eeprom_read() 159 static ssize_t ds1682_eeprom_write(struct file *filp, struct kobject *kobj, in ds1682_eeprom_write() argument 163 struct i2c_client *client = kobj_to_i2c_client(kobj); in ds1682_eeprom_write() 201 rc = sysfs_create_group(&client->dev.kobj, &ds1682_group); in ds1682_probe() 205 rc = sysfs_create_bin_file(&client->dev.kobj, &ds1682_eeprom_attr); in ds1682_probe() 212 sysfs_remove_group(&client->dev.kobj, &ds1682_group); in ds1682_probe() 219 sysfs_remove_bin_file(&client->dev.kobj, &ds1682_eeprom_attr); in ds1682_remove() 220 sysfs_remove_group(&client->dev.kobj, &ds1682_group); in ds1682_remove()
|
D | pch_phub.c | 493 static ssize_t pch_phub_bin_read(struct file *filp, struct kobject *kobj, in pch_phub_bin_read() argument 507 dev_get_drvdata(container_of(kobj, struct device, kobj)); in pch_phub_bin_read() 562 static ssize_t pch_phub_bin_write(struct file *filp, struct kobject *kobj, in pch_phub_bin_write() argument 571 dev_get_drvdata(container_of(kobj, struct device, kobj)); in pch_phub_bin_write() 715 ret = sysfs_create_file(&pdev->dev.kobj, in pch_phub_probe() 720 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr); in pch_phub_probe() 745 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr); in pch_phub_probe() 768 ret = sysfs_create_file(&pdev->dev.kobj, in pch_phub_probe() 772 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pch_bin_attr); in pch_phub_probe() 785 ret = sysfs_create_file(&pdev->dev.kobj, in pch_phub_probe() [all …]
|
D | ad525x_dpot.c | 641 int err = sysfs_create_file(&dev->kobj, in ad_dpot_add_files() 644 err |= sysfs_create_file(&dev->kobj, in ad_dpot_add_files() 647 err |= sysfs_create_file(&dev->kobj, in ad_dpot_add_files() 650 err |= sysfs_create_file(&dev->kobj, in ad_dpot_add_files() 652 err |= sysfs_create_file(&dev->kobj, in ad_dpot_add_files() 666 sysfs_remove_file(&dev->kobj, in ad_dpot_remove_files() 669 sysfs_remove_file(&dev->kobj, in ad_dpot_remove_files() 672 sysfs_remove_file(&dev->kobj, in ad_dpot_remove_files() 675 sysfs_remove_file(&dev->kobj, in ad_dpot_remove_files() 677 sysfs_remove_file(&dev->kobj, in ad_dpot_remove_files() [all …]
|
D | enclosure.c | 211 if (cdev->dev->kobj.sd) in enclosure_remove_links() 212 sysfs_remove_link(&cdev->dev->kobj, name); in enclosure_remove_links() 214 if (cdev->cdev.kobj.sd) in enclosure_remove_links() 215 sysfs_remove_link(&cdev->cdev.kobj, "device"); in enclosure_remove_links() 223 error = sysfs_create_link(&cdev->cdev.kobj, &cdev->dev->kobj, "device"); in enclosure_add_links() 228 error = sysfs_create_link(&cdev->dev->kobj, &cdev->cdev.kobj, name); in enclosure_add_links() 230 sysfs_remove_link(&cdev->cdev.kobj, "device"); in enclosure_add_links()
|
D | ti_dac7512.c | 66 return sysfs_create_group(&spi->dev.kobj, &dac7512_attr_group); in dac7512_probe() 71 sysfs_remove_group(&spi->dev.kobj, &dac7512_attr_group); in dac7512_remove()
|
/linux-4.4.14/drivers/video/fbdev/omap2/dss/ |
D | display-sysfs.c | 280 static ssize_t display_attr_show(struct kobject *kobj, struct attribute *attr, in display_attr_show() argument 286 dssdev = container_of(kobj, struct omap_dss_device, kobj); in display_attr_show() 295 static ssize_t display_attr_store(struct kobject *kobj, struct attribute *attr, in display_attr_store() argument 301 dssdev = container_of(kobj, struct omap_dss_device, kobj); in display_attr_store() 326 r = kobject_init_and_add(&dssdev->kobj, &display_ktype, in display_init_sysfs() 327 &pdev->dev.kobj, "%s", dssdev->alias); in display_init_sysfs() 348 if (kobject_name(&dssdev->kobj) == NULL) in display_uninit_sysfs() 351 kobject_del(&dssdev->kobj); in display_uninit_sysfs() 352 kobject_put(&dssdev->kobj); in display_uninit_sysfs() 354 memset(&dssdev->kobj, 0, sizeof(dssdev->kobj)); in display_uninit_sysfs()
|
D | manager-sysfs.c | 478 static ssize_t manager_attr_show(struct kobject *kobj, struct attribute *attr, in manager_attr_show() argument 484 manager = container_of(kobj, struct omap_overlay_manager, kobj); in manager_attr_show() 493 static ssize_t manager_attr_store(struct kobject *kobj, struct attribute *attr, in manager_attr_store() argument 499 manager = container_of(kobj, struct omap_overlay_manager, kobj); in manager_attr_store() 521 return kobject_init_and_add(&mgr->kobj, &manager_ktype, in dss_manager_kobj_init() 522 &pdev->dev.kobj, "manager%d", mgr->id); in dss_manager_kobj_init() 527 kobject_del(&mgr->kobj); in dss_manager_kobj_uninit() 528 kobject_put(&mgr->kobj); in dss_manager_kobj_uninit() 530 memset(&mgr->kobj, 0, sizeof(mgr->kobj)); in dss_manager_kobj_uninit()
|
D | overlay-sysfs.c | 405 static ssize_t overlay_attr_show(struct kobject *kobj, struct attribute *attr, in overlay_attr_show() argument 411 overlay = container_of(kobj, struct omap_overlay, kobj); in overlay_attr_show() 420 static ssize_t overlay_attr_store(struct kobject *kobj, struct attribute *attr, in overlay_attr_store() argument 426 overlay = container_of(kobj, struct omap_overlay, kobj); in overlay_attr_store() 448 return kobject_init_and_add(&ovl->kobj, &overlay_ktype, in dss_overlay_kobj_init() 449 &pdev->dev.kobj, "overlay%d", ovl->id); in dss_overlay_kobj_init() 454 kobject_del(&ovl->kobj); in dss_overlay_kobj_uninit() 455 kobject_put(&ovl->kobj); in dss_overlay_kobj_uninit()
|
/linux-4.4.14/drivers/uio/ |
D | uio.c | 44 struct kobject kobj; member 47 #define to_map(map) container_of(map, struct uio_map, kobj) 95 static void map_release(struct kobject *kobj) in map_release() argument 97 struct uio_map *map = to_map(kobj); in map_release() 101 static ssize_t map_type_show(struct kobject *kobj, struct attribute *attr, in map_type_show() argument 104 struct uio_map *map = to_map(kobj); in map_type_show() 127 struct kobject kobj; member 130 #define to_portio(portio) container_of(portio, struct uio_portio, kobj) 183 static void portio_release(struct kobject *kobj) in portio_release() argument 185 struct uio_portio *portio = to_portio(kobj); in portio_release() [all …]
|
/linux-4.4.14/drivers/gpu/drm/i915/ |
D | i915_sysfs.c | 162 i915_l3_read(struct file *filp, struct kobject *kobj, in i915_l3_read() argument 166 struct device *dev = container_of(kobj, struct device, kobj); in i915_l3_read() 198 i915_l3_write(struct file *filp, struct kobject *kobj, in i915_l3_write() argument 202 struct device *dev = container_of(kobj, struct device, kobj); in i915_l3_write() 518 static ssize_t error_state_read(struct file *filp, struct kobject *kobj, in error_state_read() argument 523 struct device *kdev = container_of(kobj, struct device, kobj); in error_state_read() 554 static ssize_t error_state_write(struct file *file, struct kobject *kobj, in error_state_write() argument 558 struct device *kdev = container_of(kobj, struct device, kobj); in error_state_write() 589 ret = sysfs_merge_group(&dev->primary->kdev->kobj, in i915_setup_sysfs() 595 ret = sysfs_merge_group(&dev->primary->kdev->kobj, in i915_setup_sysfs() [all …]
|
/linux-4.4.14/net/core/ |
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, in rx_queue_attr_show() argument 635 struct netdev_rx_queue *queue = to_rx_queue(kobj); in rx_queue_attr_show() 643 static ssize_t rx_queue_attr_store(struct kobject *kobj, struct attribute *attr, in rx_queue_attr_store() argument 647 struct netdev_rx_queue *queue = to_rx_queue(kobj); in rx_queue_attr_store() 842 static void rx_queue_release(struct kobject *kobj) in rx_queue_release() argument 844 struct netdev_rx_queue *queue = to_rx_queue(kobj); in rx_queue_release() 863 memset(kobj, 0, sizeof(*kobj)); in rx_queue_release() 867 static const void *rx_queue_namespace(struct kobject *kobj) in rx_queue_namespace() argument 869 struct netdev_rx_queue *queue = to_rx_queue(kobj); in rx_queue_namespace() [all …]
|
/linux-4.4.14/arch/s390/kernel/ |
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, in ipl_type_show() argument 352 static ssize_t ipl_vm_parm_show(struct kobject *kobj, in ipl_vm_parm_show() argument 419 static ssize_t sys_ipl_device_show(struct kobject *kobj, in sys_ipl_device_show() argument 438 static ssize_t ipl_parameter_read(struct file *filp, struct kobject *kobj, in ipl_parameter_read() argument 449 static ssize_t ipl_scp_data_read(struct file *filp, struct kobject *kobj, in ipl_scp_data_read() argument 478 static ssize_t ipl_ccw_loadparm_show(struct kobject *kobj, in ipl_ccw_loadparm_show() argument [all …]
|
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/linux/ |
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, in static_uintvalue_show() argument 73 static ssize_t static_uintvalue_store(struct kobject *kobj, in static_uintvalue_store() argument 99 static ssize_t max_dirty_mb_show(struct kobject *kobj, struct attribute *attr, in max_dirty_mb_show() argument 106 static ssize_t max_dirty_mb_store(struct kobject *kobj, struct attribute *attr, in max_dirty_mb_store() argument
|
D | linux-module.c | 216 static ssize_t version_show(struct kobject *kobj, struct attribute *attr, in version_show() argument 222 static ssize_t pinger_show(struct kobject *kobj, struct attribute *attr, in pinger_show() argument 228 static ssize_t health_show(struct kobject *kobj, struct attribute *attr, in health_show() argument 269 static ssize_t jobid_var_show(struct kobject *kobj, struct attribute *attr, in jobid_var_show() argument 275 static ssize_t jobid_var_store(struct kobject *kobj, struct attribute *attr, in jobid_var_store() argument 293 static ssize_t jobid_name_show(struct kobject *kobj, struct attribute *attr, in jobid_name_show() argument 299 static ssize_t jobid_name_store(struct kobject *kobj, struct attribute *attr, in jobid_name_store() argument
|
/linux-4.4.14/drivers/pci/hotplug/ |
D | pci_hotplug_core.c | 318 retval = sysfs_create_file(&pci_slot->kobj, in fs_add_slot() 325 retval = sysfs_create_file(&pci_slot->kobj, in fs_add_slot() 332 retval = sysfs_create_file(&pci_slot->kobj, in fs_add_slot() 339 retval = sysfs_create_file(&pci_slot->kobj, in fs_add_slot() 346 retval = sysfs_create_file(&pci_slot->kobj, in fs_add_slot() 356 sysfs_remove_file(&pci_slot->kobj, in fs_add_slot() 360 sysfs_remove_file(&pci_slot->kobj, &hotplug_slot_attr_latch.attr); in fs_add_slot() 363 sysfs_remove_file(&pci_slot->kobj, in fs_add_slot() 367 sysfs_remove_file(&pci_slot->kobj, &hotplug_slot_attr_power.attr); in fs_add_slot() 377 sysfs_remove_file(&pci_slot->kobj, &hotplug_slot_attr_power.attr); in fs_remove_slot() [all …]
|
D | rpadlpar_sysfs.c | 32 static ssize_t add_slot_store(struct kobject *kobj, struct kobj_attribute *attr, in add_slot_store() argument 56 static ssize_t add_slot_show(struct kobject *kobj, in add_slot_show() argument 62 static ssize_t remove_slot_store(struct kobject *kobj, in remove_slot_store() argument 87 static ssize_t remove_slot_show(struct kobject *kobj, in remove_slot_show() argument 116 &pci_slots_kset->kobj); in dlpar_sysfs_init()
|
/linux-4.4.14/drivers/staging/iio/accel/ |
D | adis16220_core.c | 159 static ssize_t adis16220_accel_bin_read(struct file *filp, struct kobject *kobj, in adis16220_accel_bin_read() argument 165 struct iio_dev *indio_dev = dev_to_iio_dev(kobj_to_dev(kobj)); in adis16220_accel_bin_read() 181 static ssize_t adis16220_adc1_bin_read(struct file *filp, struct kobject *kobj, in adis16220_adc1_bin_read() argument 186 struct iio_dev *indio_dev = dev_to_iio_dev(kobj_to_dev(kobj)); in adis16220_adc1_bin_read() 202 static ssize_t adis16220_adc2_bin_read(struct file *filp, struct kobject *kobj, in adis16220_adc2_bin_read() argument 207 struct iio_dev *indio_dev = dev_to_iio_dev(kobj_to_dev(kobj)); in adis16220_adc2_bin_read() 441 ret = sysfs_create_bin_file(&indio_dev->dev.kobj, &accel_bin); in adis16220_probe() 445 ret = sysfs_create_bin_file(&indio_dev->dev.kobj, &adc1_bin); in adis16220_probe() 449 ret = sysfs_create_bin_file(&indio_dev->dev.kobj, &adc2_bin); in adis16220_probe() 463 sysfs_remove_bin_file(&indio_dev->dev.kobj, &adc2_bin); in adis16220_probe() [all …]
|
/linux-4.4.14/drivers/staging/lustre/lustre/lmv/ |
D | lproc_lmv.c | 45 static ssize_t numobd_show(struct kobject *kobj, struct attribute *attr, in numobd_show() argument 48 struct obd_device *dev = container_of(kobj, struct obd_device, in numobd_show() 80 static ssize_t placement_show(struct kobject *kobj, struct attribute *attr, in placement_show() argument 83 struct obd_device *dev = container_of(kobj, struct obd_device, in placement_show() 93 static ssize_t placement_store(struct kobject *kobj, struct attribute *attr, in placement_store() argument 97 struct obd_device *dev = container_of(kobj, struct obd_device, in placement_store() 124 static ssize_t activeobd_show(struct kobject *kobj, struct attribute *attr, in activeobd_show() argument 127 struct obd_device *dev = container_of(kobj, struct obd_device, in activeobd_show()
|
/linux-4.4.14/drivers/fmc/ |
D | fmc-core.c | 81 static ssize_t fmc_read_eeprom(struct file *file, struct kobject *kobj, in fmc_read_eeprom() argument 89 dev = container_of(kobj, struct device, kobj); in fmc_read_eeprom() 102 static ssize_t fmc_write_eeprom(struct file *file, struct kobject *kobj, in fmc_write_eeprom() argument 109 dev = container_of(kobj, struct device, kobj); in fmc_write_eeprom() 227 "\"%s\"\n", fmc->slot_id, fmc->dev.kobj.name); in fmc_device_register_n() 230 ret = sysfs_create_bin_file(&fmc->dev.kobj, &fmc_eeprom_attr); in fmc_device_register_n() 249 sysfs_remove_bin_file(&devs[i]->dev.kobj, &fmc_eeprom_attr); in fmc_device_register_n() 276 sysfs_remove_bin_file(&devs[i]->dev.kobj, &fmc_eeprom_attr); in fmc_device_unregister_n()
|
/linux-4.4.14/drivers/staging/most/mostcore/ |
D | core.c | 48 struct kobject kobj; member 73 #define to_c_obj(d) container_of(d, struct most_c_obj, kobj) 81 struct kobject kobj; member 85 #define to_inst_obj(d) container_of(d, struct most_inst_obj, kobj) 133 static ssize_t channel_attr_show(struct kobject *kobj, struct attribute *attr, in channel_attr_show() argument 137 struct most_c_obj *c_obj = to_c_obj(kobj); in channel_attr_show() 152 static ssize_t channel_attr_store(struct kobject *kobj, in channel_attr_store() argument 158 struct most_c_obj *c_obj = to_c_obj(kobj); in channel_attr_store() 245 static void most_channel_release(struct kobject *kobj) in most_channel_release() argument 247 struct most_c_obj *c = to_c_obj(kobj); in most_channel_release() [all …]
|
/linux-4.4.14/arch/powerpc/kernel/ |
D | cacheinfo.c | 31 struct kobject *kobj; /* bare (not embedded) kobject for cache member 41 struct kobject kobj; member 135 return container_of(k, struct cache_index_dir, kobj); in kobj_to_cache_index_dir() 482 struct kobject *kobj = NULL; in cacheinfo_create_cache_dir() local 489 kobj = kobject_create_and_add("cache", &dev->kobj); in cacheinfo_create_cache_dir() 490 if (!kobj) in cacheinfo_create_cache_dir() 497 cache_dir->kobj = kobj; in cacheinfo_create_cache_dir() 505 kobject_put(kobj); in cacheinfo_create_cache_dir() 509 static void cache_index_release(struct kobject *kobj) in cache_index_release() argument 513 index = kobj_to_cache_index_dir(kobj); in cache_index_release() [all …]
|
/linux-4.4.14/drivers/base/power/ |
D | sysfs.c | 680 rc = sysfs_create_group(&dev->kobj, &pm_attr_group); in dpm_sysfs_add() 685 rc = sysfs_merge_group(&dev->kobj, &pm_runtime_attr_group); in dpm_sysfs_add() 690 rc = sysfs_merge_group(&dev->kobj, &pm_wakeup_attr_group); in dpm_sysfs_add() 695 rc = sysfs_merge_group(&dev->kobj, in dpm_sysfs_add() 703 sysfs_unmerge_group(&dev->kobj, &pm_wakeup_attr_group); in dpm_sysfs_add() 705 sysfs_unmerge_group(&dev->kobj, &pm_runtime_attr_group); in dpm_sysfs_add() 707 sysfs_remove_group(&dev->kobj, &pm_attr_group); in dpm_sysfs_add() 713 return sysfs_merge_group(&dev->kobj, &pm_wakeup_attr_group); in wakeup_sysfs_add() 718 sysfs_unmerge_group(&dev->kobj, &pm_wakeup_attr_group); in wakeup_sysfs_remove() 723 return sysfs_merge_group(&dev->kobj, &pm_qos_resume_latency_attr_group); in pm_qos_sysfs_add_resume_latency() [all …]
|
/linux-4.4.14/drivers/hwmon/ |
D | mc13783-adc.c | 195 ret = sysfs_create_group(&pdev->dev.kobj, &mc13783_group_base); in mc13783_adc_probe() 200 ret = sysfs_create_group(&pdev->dev.kobj, in mc13783_adc_probe() 207 ret = sysfs_create_group(&pdev->dev.kobj, &mc13783_group_ts); in mc13783_adc_probe() 225 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_ts); in mc13783_adc_probe() 229 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_16chans); in mc13783_adc_probe() 232 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_base); in mc13783_adc_probe() 244 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_ts); in mc13783_adc_remove() 247 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_16chans); in mc13783_adc_remove() 249 sysfs_remove_group(&pdev->dev.kobj, &mc13783_group_base); in mc13783_adc_remove()
|
D | max1111.c | 228 err = sysfs_create_group(&spi->dev.kobj, &max1111_attr_group); in max1111_probe() 234 err = sysfs_create_group(&spi->dev.kobj, &max1110_attr_group); in max1111_probe() 255 sysfs_remove_group(&spi->dev.kobj, &max1110_attr_group); in max1111_probe() 256 sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group); in max1111_probe() 268 sysfs_remove_group(&spi->dev.kobj, &max1110_attr_group); in max1111_remove() 269 sysfs_remove_group(&spi->dev.kobj, &max1111_attr_group); in max1111_remove()
|
D | smsc47m1.c | 695 sysfs_remove_group(&dev->kobj, &smsc47m1_group); in smsc47m1_remove_files() 696 sysfs_remove_group(&dev->kobj, &smsc47m1_group_fan1); in smsc47m1_remove_files() 697 sysfs_remove_group(&dev->kobj, &smsc47m1_group_fan2); in smsc47m1_remove_files() 698 sysfs_remove_group(&dev->kobj, &smsc47m1_group_fan3); in smsc47m1_remove_files() 699 sysfs_remove_group(&dev->kobj, &smsc47m1_group_pwm1); in smsc47m1_remove_files() 700 sysfs_remove_group(&dev->kobj, &smsc47m1_group_pwm2); in smsc47m1_remove_files() 701 sysfs_remove_group(&dev->kobj, &smsc47m1_group_pwm3); in smsc47m1_remove_files() 776 err = sysfs_create_group(&dev->kobj, in smsc47m1_probe() 784 err = sysfs_create_group(&dev->kobj, in smsc47m1_probe() 792 err = sysfs_create_group(&dev->kobj, in smsc47m1_probe() [all …]
|
D | pcf8591.c | 215 err = sysfs_create_group(&client->dev.kobj, &pcf8591_attr_group); in pcf8591_probe() 242 sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group_opt); in pcf8591_probe() 243 sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group); in pcf8591_probe() 252 sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group_opt); in pcf8591_remove() 253 sysfs_remove_group(&client->dev.kobj, &pcf8591_attr_group); in pcf8591_remove()
|
D | lm87.c | 848 sysfs_remove_group(&dev->kobj, &lm87_group); in lm87_remove_files() 849 sysfs_remove_group(&dev->kobj, &lm87_group_in6); in lm87_remove_files() 850 sysfs_remove_group(&dev->kobj, &lm87_group_fan1); in lm87_remove_files() 851 sysfs_remove_group(&dev->kobj, &lm87_group_in7); in lm87_remove_files() 852 sysfs_remove_group(&dev->kobj, &lm87_group_fan2); in lm87_remove_files() 853 sysfs_remove_group(&dev->kobj, &lm87_group_temp3); in lm87_remove_files() 854 sysfs_remove_group(&dev->kobj, &lm87_group_in0_5); in lm87_remove_files() 855 sysfs_remove_group(&dev->kobj, &lm87_group_vid); in lm87_remove_files() 925 err = sysfs_create_group(&client->dev.kobj, &lm87_group); in lm87_probe() 930 err = sysfs_create_group(&client->dev.kobj, &lm87_group_in6); in lm87_probe() [all …]
|
D | ad7314.c | 122 ret = sysfs_create_group(&spi_dev->dev.kobj, &ad7314_group); in ad7314_probe() 135 sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); in ad7314_probe() 144 sysfs_remove_group(&spi_dev->dev.kobj, &ad7314_group); in ad7314_remove()
|
D | nct7904.c | 176 static umode_t nct7904_fanin_is_visible(struct kobject *kobj, in nct7904_fanin_is_visible() argument 179 struct device *dev = container_of(kobj, struct device, kobj); in nct7904_fanin_is_visible() 258 static umode_t nct7904_vsen_is_visible(struct kobject *kobj, in nct7904_vsen_is_visible() argument 261 struct device *dev = container_of(kobj, struct device, kobj); in nct7904_vsen_is_visible() 344 static umode_t nct7904_tcpu_is_visible(struct kobject *kobj, in nct7904_tcpu_is_visible() argument 347 struct device *dev = container_of(kobj, struct device, kobj); in nct7904_tcpu_is_visible()
|
D | abx500.c | 111 sysfs_notify(&data->pdev->dev.kobj, NULL, alarm_node); in gpadc_monitor() 115 sysfs_notify(&data->pdev->dev.kobj, NULL, alarm_node); in gpadc_monitor() 263 static umode_t abx500_attrs_visible(struct kobject *kobj, in abx500_attrs_visible() argument 266 struct device *dev = container_of(kobj, struct device, kobj); in abx500_attrs_visible() 409 err = sysfs_create_group(&pdev->dev.kobj, &abx500_temp_group); in abx500_temp_probe() 432 sysfs_remove_group(&pdev->dev.kobj, &abx500_temp_group); in abx500_temp_probe() 442 sysfs_remove_group(&pdev->dev.kobj, &abx500_temp_group); in abx500_temp_remove()
|
D | mcp3021.c | 142 err = sysfs_create_file(&client->dev.kobj, &dev_attr_in0_input.attr); in mcp3021_probe() 155 sysfs_remove_file(&client->dev.kobj, &dev_attr_in0_input.attr); in mcp3021_probe() 164 sysfs_remove_file(&client->dev.kobj, &dev_attr_in0_input.attr); in mcp3021_remove()
|
/linux-4.4.14/fs/nilfs2/ |
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, \ [all …]
|
/linux-4.4.14/drivers/infiniband/hw/qib/ |
D | qib_sysfs.c | 211 static ssize_t read_cc_table_bin(struct file *filp, struct kobject *kobj, in read_cc_table_bin() argument 217 container_of(kobj, struct qib_pportdata, pport_cc_kobj); in read_cc_table_bin() 241 static void qib_port_release(struct kobject *kobj) in qib_port_release() argument 261 static ssize_t read_cc_setting_bin(struct file *filp, struct kobject *kobj, in read_cc_setting_bin() argument 267 container_of(kobj, struct qib_pportdata, pport_cc_kobj); in read_cc_setting_bin() 296 static ssize_t qib_portattr_show(struct kobject *kobj, in qib_portattr_show() argument 302 container_of(kobj, struct qib_pportdata, pport_kobj); in qib_portattr_show() 307 static ssize_t qib_portattr_store(struct kobject *kobj, in qib_portattr_store() argument 313 container_of(kobj, struct qib_pportdata, pport_kobj); in qib_portattr_store() 380 static ssize_t sl2vl_attr_show(struct kobject *kobj, struct attribute *attr, in sl2vl_attr_show() argument [all …]
|
/linux-4.4.14/drivers/gpu/drm/amd/amdkfd/ |
D | kfd_topology.c | 498 static ssize_t sysprops_show(struct kobject *kobj, struct attribute *attr, in sysprops_show() argument 530 static ssize_t iolink_show(struct kobject *kobj, struct attribute *attr, in iolink_show() argument 565 static ssize_t mem_show(struct kobject *kobj, struct attribute *attr, in mem_show() argument 592 static ssize_t kfd_cache_show(struct kobject *kobj, struct attribute *attr, in kfd_cache_show() argument 631 static ssize_t node_show(struct kobject *kobj, struct attribute *attr, in node_show() argument 753 static void kfd_remove_sysfs_file(struct kobject *kobj, struct attribute *attr) in kfd_remove_sysfs_file() argument 755 sysfs_remove_file(kobj, attr); in kfd_remove_sysfs_file() 756 kobject_del(kobj); in kfd_remove_sysfs_file() 757 kobject_put(kobj); in kfd_remove_sysfs_file() 770 if (iolink->kobj) { in kfd_remove_sysfs_node_entry() [all …]
|
D | kfd_topology.h | 90 struct kobject *kobj; member 113 struct kobject *kobj; member 131 struct kobject *kobj; member
|
/linux-4.4.14/drivers/power/ |
D | ds2781_battery.c | 634 struct kobject *kobj, in ds2781_read_param_eeprom_bin() argument 638 struct device *dev = container_of(kobj, struct device, kobj); in ds2781_read_param_eeprom_bin() 647 struct kobject *kobj, in ds2781_write_param_eeprom_bin() argument 651 struct device *dev = container_of(kobj, struct device, kobj); in ds2781_write_param_eeprom_bin() 679 struct kobject *kobj, in ds2781_read_user_eeprom_bin() argument 683 struct device *dev = container_of(kobj, struct device, kobj); in ds2781_read_user_eeprom_bin() 693 struct kobject *kobj, in ds2781_write_user_eeprom_bin() argument 697 struct device *dev = container_of(kobj, struct device, kobj); in ds2781_write_user_eeprom_bin() 776 ret = sysfs_create_group(&dev_info->bat->dev.kobj, &ds2781_attr_group); in ds2781_battery_probe() 782 ret = sysfs_create_bin_file(&dev_info->bat->dev.kobj, in ds2781_battery_probe() [all …]
|
D | ds2780_battery.c | 632 struct kobject *kobj, in ds2780_read_param_eeprom_bin() argument 636 struct device *dev = container_of(kobj, struct device, kobj); in ds2780_read_param_eeprom_bin() 645 struct kobject *kobj, in ds2780_write_param_eeprom_bin() argument 649 struct device *dev = container_of(kobj, struct device, kobj); in ds2780_write_param_eeprom_bin() 677 struct kobject *kobj, in ds2780_read_user_eeprom_bin() argument 681 struct device *dev = container_of(kobj, struct device, kobj); in ds2780_read_user_eeprom_bin() 690 struct kobject *kobj, in ds2780_write_user_eeprom_bin() argument 694 struct device *dev = container_of(kobj, struct device, kobj); in ds2780_write_user_eeprom_bin() 775 ret = sysfs_create_group(&dev_info->bat->dev.kobj, &ds2780_attr_group); in ds2780_battery_probe() 781 ret = sysfs_create_bin_file(&dev_info->bat->dev.kobj, in ds2780_battery_probe() [all …]
|
/linux-4.4.14/drivers/staging/most/hdm-dim2/ |
D | dim2_sysfs.c | 46 static void bus_kobj_release(struct kobject *kobj) in bus_kobj_release() argument 50 static ssize_t bus_kobj_attr_show(struct kobject *kobj, struct attribute *attr, in bus_kobj_attr_show() argument 54 container_of(kobj, struct medialb_bus, kobj_group); in bus_kobj_attr_show() 63 static ssize_t bus_kobj_attr_store(struct kobject *kobj, struct attribute *attr, in bus_kobj_attr_store() argument 68 container_of(kobj, struct medialb_bus, kobj_group); in bus_kobj_attr_store()
|
/linux-4.4.14/kernel/livepatch/ |
D | core.c | 599 static ssize_t enabled_store(struct kobject *kobj, struct kobj_attribute *attr, in enabled_store() argument 613 patch = container_of(kobj, struct klp_patch, kobj); in enabled_store() 642 static ssize_t enabled_show(struct kobject *kobj, in enabled_show() argument 647 patch = container_of(kobj, struct klp_patch, kobj); in enabled_show() 657 static void klp_kobj_release_patch(struct kobject *kobj) in klp_kobj_release_patch() argument 671 static void klp_kobj_release_object(struct kobject *kobj) in klp_kobj_release_object() argument 680 static void klp_kobj_release_func(struct kobject *kobj) in klp_kobj_release_func() argument 699 kobject_put(&func->kobj); in klp_free_funcs_limited() 724 kobject_put(&obj->kobj); in klp_free_objects_limited() 733 kobject_put(&patch->kobj); in klp_free_patch() [all …]
|
/linux-4.4.14/arch/alpha/kernel/ |
D | pci-sysfs.c | 63 static int pci_mmap_resource(struct kobject *kobj, in pci_mmap_resource() argument 67 struct pci_dev *pdev = to_pci_dev(container_of(kobj, in pci_mmap_resource() 68 struct device, kobj)); in pci_mmap_resource() 93 static int pci_mmap_resource_sparse(struct file *filp, struct kobject *kobj, in pci_mmap_resource_sparse() argument 97 return pci_mmap_resource(kobj, attr, vma, 1); in pci_mmap_resource_sparse() 100 static int pci_mmap_resource_dense(struct file *filp, struct kobject *kobj, in pci_mmap_resource_dense() argument 104 return pci_mmap_resource(kobj, attr, vma, 0); in pci_mmap_resource_dense() 123 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); in pci_remove_resource_files() 129 sysfs_remove_bin_file(&pdev->dev.kobj, res_attr); in pci_remove_resource_files() 167 return sysfs_create_bin_file(&pdev->dev.kobj, res_attr); in pci_create_one_attr()
|
/linux-4.4.14/net/bridge/ |
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, in brport_show() argument 230 struct net_bridge_port *p = to_brport(kobj); in brport_show() 235 static ssize_t brport_store(struct kobject *kobj, in brport_store() argument 240 struct net_bridge_port *p = to_brport(kobj); in brport_store() 280 err = sysfs_create_link(&p->kobj, &br->dev->dev.kobj, in br_sysfs_addif() 286 err = sysfs_create_file(&p->kobj, &((*a)->attr)); in br_sysfs_addif() 292 return sysfs_create_link(br->ifobj, &p->kobj, p->sysfs_name); in br_sysfs_addif() 307 err = sysfs_rename_link(br->ifobj, &p->kobj, in br_sysfs_renameif()
|
D | br_if.c | 194 static void release_nbp(struct kobject *kobj) in release_nbp() argument 197 = container_of(kobj, struct net_bridge_port, kobj); in release_nbp() 216 kobject_put(&p->kobj); in destroy_nbp() 266 kobject_uevent(&p->kobj, KOBJ_REMOVE); in del_nbp() 267 kobject_del(&p->kobj); in del_nbp() 477 err = kobject_init_and_add(&p->kobj, &brport_ktype, &(dev->dev.kobj), in br_add_if() 532 kobject_uevent(&p->kobj, KOBJ_ADD); in br_add_if() 544 kobject_put(&p->kobj); in br_add_if()
|
/linux-4.4.14/drivers/s390/char/ |
D | sclp_cpi_sys.c | 221 static ssize_t system_name_show(struct kobject *kobj, in system_name_show() argument 232 static ssize_t system_name_store(struct kobject *kobj, in system_name_store() argument 253 static ssize_t sysplex_name_show(struct kobject *kobj, in sysplex_name_show() argument 264 static ssize_t sysplex_name_store(struct kobject *kobj, in sysplex_name_store() argument 285 static ssize_t system_type_show(struct kobject *kobj, in system_type_show() argument 296 static ssize_t system_type_store(struct kobject *kobj, in system_type_store() argument 317 static ssize_t system_level_show(struct kobject *kobj, in system_level_show() argument 328 static ssize_t system_level_store(struct kobject *kobj, in system_level_store() argument 354 static ssize_t set_store(struct kobject *kobj, in set_store() argument 422 rc = sysfs_create_group(&cpi_kset->kobj, &cpi_attr_group); in cpi_init()
|
D | sclp_ocf.c | 38 kobject_uevent(&ocf_kset->kobj, KOBJ_CHANGE); in sclp_ocf_change_notify() 88 static ssize_t cpc_name_show(struct kobject *kobj, in cpc_name_show() argument 102 static ssize_t hmc_network_show(struct kobject *kobj, in hmc_network_show() argument 135 rc = sysfs_create_group(&ocf_kset->kobj, &ocf_attr_group); in ocf_init()
|
D | tape_class.c | 84 &device->kobj, in register_tape_dev() 85 &tcd->class_device->kobj, in register_tape_dev() 109 sysfs_remove_link(&device->kobj, tcd->mode_name); in unregister_tape_dev()
|
/linux-4.4.14/drivers/staging/rdma/hfi1/ |
D | sysfs.c | 64 static ssize_t read_cc_table_bin(struct file *filp, struct kobject *kobj, in read_cc_table_bin() argument 70 container_of(kobj, struct hfi1_pportdata, pport_cc_kobj); in read_cc_table_bin() 97 static void port_release(struct kobject *kobj) in port_release() argument 117 static ssize_t read_cc_setting_bin(struct file *filp, struct kobject *kobj, in read_cc_setting_bin() argument 123 container_of(kobj, struct hfi1_pportdata, pport_cc_kobj); in read_cc_setting_bin() 236 static ssize_t sc2vl_attr_show(struct kobject *kobj, struct attribute *attr, in sc2vl_attr_show() argument 242 container_of(kobj, struct hfi1_pportdata, sc2vl_kobj); in sc2vl_attr_show() 342 static ssize_t sl2sc_attr_show(struct kobject *kobj, struct attribute *attr, in sl2sc_attr_show() argument 348 container_of(kobj, struct hfi1_pportdata, sl2sc_kobj); in sl2sc_attr_show() 416 static ssize_t vl2mtu_attr_show(struct kobject *kobj, struct attribute *attr, in vl2mtu_attr_show() argument [all …]
|
/linux-4.4.14/arch/sh/kernel/cpu/sh4/ |
D | sq.c | 269 static ssize_t sq_sysfs_show(struct kobject *kobj, struct attribute *attr, in sq_sysfs_show() argument 280 static ssize_t sq_sysfs_store(struct kobject *kobj, struct attribute *attr, in sq_sysfs_store() argument 343 struct kobject *kobj; in sq_dev_add() local 350 kobj = sq_kobject[cpu]; in sq_dev_add() 351 error = kobject_init_and_add(kobj, &ktype_percpu_entry, &dev->kobj, in sq_dev_add() 354 kobject_uevent(kobj, KOBJ_ADD); in sq_dev_add() 361 struct kobject *kobj = sq_kobject[cpu]; in sq_dev_remove() local 363 kobject_put(kobj); in sq_dev_remove()
|
/linux-4.4.14/drivers/infiniband/hw/mlx4/ |
D | sysfs.c | 159 sysfs_remove_file((_dentry)->kobj, &(_dentry)->dentry.attr); \ 181 vdentry->kobj = _kobj; in create_sysfs_entry() 190 ret = sysfs_create_file(vdentry->kobj, &vdentry->dentry.attr); in create_sysfs_entry() 368 struct kobject kobj; member 379 static void mlx4_port_release(struct kobject *kobj) in mlx4_port_release() argument 381 struct mlx4_port *p = container_of(kobj, struct mlx4_port, kobj); in mlx4_port_release() 401 static ssize_t port_attr_show(struct kobject *kobj, in port_attr_show() argument 406 struct mlx4_port *p = container_of(kobj, struct mlx4_port, kobj); in port_attr_show() 413 static ssize_t port_attr_store(struct kobject *kobj, in port_attr_store() argument 419 struct mlx4_port *p = container_of(kobj, struct mlx4_port, kobj); in port_attr_store() [all …]
|
/linux-4.4.14/drivers/of/ |
D | of_private.h | 39 static inline struct device_node *kobj_to_device_node(struct kobject *kobj) in kobj_to_device_node() argument 41 return container_of(kobj, struct device_node, kobj); in kobj_to_device_node() 47 extern void of_node_release(struct kobject *kobj);
|
/linux-4.4.14/drivers/staging/lustre/lustre/mdc/ |
D | lproc_mdc.c | 43 static ssize_t max_rpcs_in_flight_show(struct kobject *kobj, in max_rpcs_in_flight_show() argument 48 struct obd_device *dev = container_of(kobj, struct obd_device, in max_rpcs_in_flight_show() 59 static ssize_t max_rpcs_in_flight_store(struct kobject *kobj, in max_rpcs_in_flight_store() argument 64 struct obd_device *dev = container_of(kobj, struct obd_device, in max_rpcs_in_flight_store() 175 static ssize_t max_pages_per_rpc_show(struct kobject *kobj, in max_pages_per_rpc_show() argument 179 struct obd_device *dev = container_of(kobj, struct obd_device, in max_pages_per_rpc_show()
|
/linux-4.4.14/arch/cris/arch-v32/drivers/ |
D | iop_fw_load.c | 206 kobject_set_name(&iop_spu_device[0].kobj, "iop-spu0"); in iop_fw_load_init() 207 kobject_add(&iop_spu_device[0].kobj); in iop_fw_load_init() 209 kobject_set_name(&iop_spu_device[1].kobj, "iop-spu1"); in iop_fw_load_init() 210 kobject_add(&iop_spu_device[1].kobj); in iop_fw_load_init() 212 kobject_set_name(&iop_mpu_device.kobj, "iop-mpu"); in iop_fw_load_init() 213 kobject_add(&iop_mpu_device.kobj); in iop_fw_load_init()
|
/linux-4.4.14/drivers/infiniband/core/ |
D | sysfs.c | 44 struct kobject kobj; member 70 static ssize_t port_attr_show(struct kobject *kobj, in port_attr_show() argument 75 struct ib_port *p = container_of(kobj, struct ib_port, kobj); in port_attr_show() 431 static void ib_port_release(struct kobject *kobj) in ib_port_release() argument 433 struct ib_port *p = container_of(kobj, struct ib_port, kobj); in ib_port_release() 523 ret = kobject_init_and_add(&p->kobj, &port_type, in add_port() 531 ret = sysfs_create_group(&p->kobj, &pma_group); in add_port() 542 ret = sysfs_create_group(&p->kobj, &p->gid_group); in add_port() 554 ret = sysfs_create_group(&p->kobj, &p->pkey_group); in add_port() 559 ret = port_callback(device, port_num, &p->kobj); in add_port() [all …]
|
/linux-4.4.14/drivers/acpi/ |
D | processor_driver.c | 185 result = sysfs_create_link(&device->dev.kobj, in acpi_pss_perf_init() 186 &pr->cdev->device.kobj, in acpi_pss_perf_init() 194 result = sysfs_create_link(&pr->cdev->device.kobj, in acpi_pss_perf_init() 195 &device->dev.kobj, in acpi_pss_perf_init() 206 sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); in acpi_pss_perf_init() 217 sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); in acpi_pss_perf_exit() 218 sysfs_remove_link(&pr->cdev->device.kobj, "device"); in acpi_pss_perf_exit()
|
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, in acpi_data_node_attr_show() argument 71 struct acpi_data_node *dn = to_data_node(kobj); in acpi_data_node_attr_show() 81 static void acpi_data_node_release(struct kobject *kobj) in acpi_data_node_release() argument 83 struct acpi_data_node *dn = to_data_node(kobj); in acpi_data_node_release() 93 static void acpi_expose_nondev_subnodes(struct kobject *kobj, in acpi_expose_nondev_subnodes() argument 106 ret = kobject_init_and_add(&dn->kobj, &acpi_data_node_ktype, in acpi_expose_nondev_subnodes() 107 kobj, "%s", dn->name); in acpi_expose_nondev_subnodes() 111 acpi_expose_nondev_subnodes(&dn->kobj, &dn->data); in acpi_expose_nondev_subnodes() 125 kobject_put(&dn->kobj); in acpi_hide_nondev_subnodes() [all …]
|
D | glue.c | 234 retval = sysfs_create_link(&acpi_dev->dev.kobj, &dev->kobj, in acpi_bind_one() 240 retval = sysfs_create_link(&dev->kobj, &acpi_dev->dev.kobj, in acpi_bind_one() 279 sysfs_remove_link(&acpi_dev->dev.kobj, physnode_name); in acpi_unbind_one() 280 sysfs_remove_link(&dev->kobj, "firmware_node"); in acpi_unbind_one()
|
D | fan.c | 362 result = sysfs_create_link(&pdev->dev.kobj, in acpi_fan_probe() 363 &cdev->device.kobj, in acpi_fan_probe() 368 result = sysfs_create_link(&cdev->device.kobj, in acpi_fan_probe() 369 &pdev->dev.kobj, in acpi_fan_probe() 382 sysfs_remove_link(&pdev->dev.kobj, "thermal_cooling"); in acpi_fan_remove() 383 sysfs_remove_link(&fan->cdev->device.kobj, "device"); in acpi_fan_remove()
|
D | sysfs.c | 324 static ssize_t acpi_table_show(struct file *filp, struct kobject *kobj, in acpi_table_show() argument 578 static ssize_t counter_show(struct kobject *kobj, in counter_show() argument 622 static ssize_t counter_set(struct kobject *kobj, in counter_set() argument 789 static ssize_t hotplug_enabled_show(struct kobject *kobj, in hotplug_enabled_show() argument 792 struct acpi_hotplug_profile *hotplug = to_acpi_hotplug_profile(kobj); in hotplug_enabled_show() 797 static ssize_t hotplug_enabled_store(struct kobject *kobj, in hotplug_enabled_store() argument 801 struct acpi_hotplug_profile *hotplug = to_acpi_hotplug_profile(kobj); in hotplug_enabled_store() 833 error = kobject_init_and_add(&hotplug->kobj, in acpi_sysfs_add_hotplug_profile() 838 kobject_uevent(&hotplug->kobj, KOBJ_ADD); in acpi_sysfs_add_hotplug_profile() 845 static ssize_t force_remove_show(struct kobject *kobj, in force_remove_show() argument [all …]
|
/linux-4.4.14/drivers/rtc/ |
D | rtc-rp5c01.c | 163 static ssize_t rp5c01_nvram_read(struct file *filp, struct kobject *kobj, in rp5c01_nvram_read() argument 167 struct device *dev = container_of(kobj, struct device, kobj); in rp5c01_nvram_read() 193 static ssize_t rp5c01_nvram_write(struct file *filp, struct kobject *kobj, in rp5c01_nvram_write() argument 197 struct device *dev = container_of(kobj, struct device, kobj); in rp5c01_nvram_write() 258 error = sysfs_create_bin_file(&dev->dev.kobj, &priv->nvram_attr); in rp5c01_rtc_probe() 269 sysfs_remove_bin_file(&dev->dev.kobj, &priv->nvram_attr); in rp5c01_rtc_remove()
|
D | rtc-ds1742.c | 127 static ssize_t ds1742_nvram_read(struct file *filp, struct kobject *kobj, in ds1742_nvram_read() argument 131 struct device *dev = container_of(kobj, struct device, kobj); in ds1742_nvram_read() 142 static ssize_t ds1742_nvram_write(struct file *filp, struct kobject *kobj, in ds1742_nvram_write() argument 146 struct device *dev = container_of(kobj, struct device, kobj); in ds1742_nvram_write() 206 ret = sysfs_create_bin_file(&pdev->dev.kobj, &pdata->nvram_attr); in ds1742_rtc_probe() 218 sysfs_remove_bin_file(&pdev->dev.kobj, &pdata->nvram_attr); in ds1742_rtc_remove()
|
D | rtc-tx4939.c | 192 static ssize_t tx4939_rtc_nvram_read(struct file *filp, struct kobject *kobj, in tx4939_rtc_nvram_read() argument 196 struct device *dev = container_of(kobj, struct device, kobj); in tx4939_rtc_nvram_read() 210 static ssize_t tx4939_rtc_nvram_write(struct file *filp, struct kobject *kobj, in tx4939_rtc_nvram_write() argument 214 struct device *dev = container_of(kobj, struct device, kobj); in tx4939_rtc_nvram_write() 268 ret = sysfs_create_bin_file(&pdev->dev.kobj, &tx4939_rtc_nvram_attr); in tx4939_rtc_probe() 277 sysfs_remove_bin_file(&pdev->dev.kobj, &tx4939_rtc_nvram_attr); in tx4939_rtc_remove()
|
D | rtc-ds1553.c | 238 static ssize_t ds1553_nvram_read(struct file *filp, struct kobject *kobj, in ds1553_nvram_read() argument 242 struct device *dev = container_of(kobj, struct device, kobj); in ds1553_nvram_read() 253 static ssize_t ds1553_nvram_write(struct file *filp, struct kobject *kobj, in ds1553_nvram_write() argument 257 struct device *dev = container_of(kobj, struct device, kobj); in ds1553_nvram_write() 328 ret = sysfs_create_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr); in ds1553_rtc_probe() 340 sysfs_remove_bin_file(&pdev->dev.kobj, &ds1553_nvram_attr); in ds1553_rtc_remove()
|
D | rtc-stk17ta8.c | 247 static ssize_t stk17ta8_nvram_read(struct file *filp, struct kobject *kobj, in stk17ta8_nvram_read() argument 251 struct device *dev = container_of(kobj, struct device, kobj); in stk17ta8_nvram_read() 262 static ssize_t stk17ta8_nvram_write(struct file *filp, struct kobject *kobj, in stk17ta8_nvram_write() argument 266 struct device *dev = container_of(kobj, struct device, kobj); in stk17ta8_nvram_write() 338 ret = sysfs_create_bin_file(&pdev->dev.kobj, &stk17ta8_nvram_attr); in stk17ta8_rtc_probe() 347 sysfs_remove_bin_file(&pdev->dev.kobj, &stk17ta8_nvram_attr); in stk17ta8_rtc_remove()
|
D | rtc-ds1685.c | 938 ds1685_rtc_sysfs_nvram_read(struct file *filp, struct kobject *kobj, in ds1685_rtc_sysfs_nvram_read() argument 943 to_platform_device(container_of(kobj, struct device, kobj)); in ds1685_rtc_sysfs_nvram_read() 1018 ds1685_rtc_sysfs_nvram_write(struct file *filp, struct kobject *kobj, in ds1685_rtc_sysfs_nvram_write() argument 1023 to_platform_device(container_of(kobj, struct device, kobj)); in ds1685_rtc_sysfs_nvram_write() 1747 ret = sysfs_create_bin_file(&dev->kobj, &ds1685_rtc_sysfs_nvram_attr); in ds1685_rtc_sysfs_register() 1751 ret = sysfs_create_group(&dev->kobj, &ds1685_rtc_sysfs_misc_grp); in ds1685_rtc_sysfs_register() 1756 ret = sysfs_create_group(&dev->kobj, &ds1685_rtc_sysfs_ctrla_grp); in ds1685_rtc_sysfs_register() 1760 ret = sysfs_create_group(&dev->kobj, &ds1685_rtc_sysfs_ctrlb_grp); in ds1685_rtc_sysfs_register() 1764 ret = sysfs_create_group(&dev->kobj, &ds1685_rtc_sysfs_ctrlc_grp); in ds1685_rtc_sysfs_register() 1768 ret = sysfs_create_group(&dev->kobj, &ds1685_rtc_sysfs_ctrld_grp); in ds1685_rtc_sysfs_register() [all …]
|
D | rtc-m48t59.c | 337 static ssize_t m48t59_nvram_read(struct file *filp, struct kobject *kobj, in m48t59_nvram_read() argument 341 struct device *dev = container_of(kobj, struct device, kobj); in m48t59_nvram_read() 358 static ssize_t m48t59_nvram_write(struct file *filp, struct kobject *kobj, in m48t59_nvram_write() argument 362 struct device *dev = container_of(kobj, struct device, kobj); in m48t59_nvram_write() 490 ret = sysfs_create_bin_file(&pdev->dev.kobj, &m48t59_nvram_attr); in m48t59_rtc_probe() 499 sysfs_remove_bin_file(&pdev->dev.kobj, &m48t59_nvram_attr); in m48t59_rtc_remove()
|
/linux-4.4.14/drivers/net/phy/ |
D | spi_ks8995.c | 212 static ssize_t ks8995_registers_read(struct file *filp, struct kobject *kobj, in ks8995_registers_read() argument 218 dev = container_of(kobj, struct device, kobj); in ks8995_registers_read() 224 static ssize_t ks8995_registers_write(struct file *filp, struct kobject *kobj, in ks8995_registers_write() argument 230 dev = container_of(kobj, struct device, kobj); in ks8995_registers_write() 313 err = sysfs_create_bin_file(&spi->dev.kobj, &ks->regs_attr); in ks8995_probe() 336 sysfs_remove_bin_file(&spi->dev.kobj, &ks->regs_attr); in ks8995_remove()
|
/linux-4.4.14/drivers/scsi/esas2r/ |
D | esas2r_main.c | 60 static struct esas2r_adapter *esas2r_adapter_from_kobj(struct kobject *kobj) in esas2r_adapter_from_kobj() argument 62 struct device *dev = container_of(kobj, struct device, kobj); in esas2r_adapter_from_kobj() 68 static ssize_t read_fw(struct file *file, struct kobject *kobj, in read_fw() argument 72 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); in read_fw() 77 static ssize_t write_fw(struct file *file, struct kobject *kobj, in write_fw() argument 81 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); in write_fw() 86 static ssize_t read_fs(struct file *file, struct kobject *kobj, in read_fs() argument 90 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); in read_fs() 95 static ssize_t write_fs(struct file *file, struct kobject *kobj, in write_fs() argument 99 struct esas2r_adapter *a = esas2r_adapter_from_kobj(kobj); in write_fs() [all …]
|
/linux-4.4.14/drivers/staging/lustre/lustre/ldlm/ |
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, \
|
D | ldlm_resource.c | 155 static ssize_t resource_count_show(struct kobject *kobj, struct attribute *attr, in resource_count_show() argument 158 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, in resource_count_show() 171 static ssize_t lock_count_show(struct kobject *kobj, struct attribute *attr, in lock_count_show() argument 174 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, in lock_count_show() 184 static ssize_t lock_unused_count_show(struct kobject *kobj, in lock_unused_count_show() argument 188 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, in lock_unused_count_show() 195 static ssize_t lru_size_show(struct kobject *kobj, struct attribute *attr, in lru_size_show() argument 198 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, in lru_size_show() 207 static ssize_t lru_size_store(struct kobject *kobj, struct attribute *attr, in lru_size_store() argument 210 struct ldlm_namespace *ns = container_of(kobj, struct ldlm_namespace, in lru_size_store() [all …]
|
/linux-4.4.14/drivers/infiniband/hw/usnic/ |
D | usnic_ib_sysfs.c | 222 usnic_ib_qpn_attr_show(struct kobject *kobj, struct attribute *attr, char *buf) in usnic_ib_qpn_attr_show() argument 227 qp_grp = container_of(kobj, struct usnic_ib_qp_grp, kobj); in usnic_ib_qpn_attr_show() 310 kobject_get(&us_ibdev->ib_dev.dev.kobj); in usnic_ib_sysfs_register_usdev() 312 &us_ibdev->ib_dev.dev.kobj); in usnic_ib_sysfs_register_usdev() 314 kobject_put(&us_ibdev->ib_dev.dev.kobj); in usnic_ib_sysfs_register_usdev() 339 err = kobject_init_and_add(&qp_grp->kobj, &usnic_ib_qpn_type, in usnic_ib_sysfs_qpn_add() 354 kobject_put(&qp_grp->kobj); in usnic_ib_sysfs_qpn_remove()
|
/linux-4.4.14/drivers/scsi/qla2xxx/ |
D | qla_attr.c | 20 qla2x00_sysfs_read_fw_dump(struct file *filp, struct kobject *kobj, in qla2x00_sysfs_read_fw_dump() argument 24 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, in qla2x00_sysfs_read_fw_dump() 25 struct device, kobj))); in qla2x00_sysfs_read_fw_dump() 53 qla2x00_sysfs_write_fw_dump(struct file *filp, struct kobject *kobj, in qla2x00_sysfs_write_fw_dump() argument 57 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, in qla2x00_sysfs_write_fw_dump() 58 struct device, kobj))); in qla2x00_sysfs_write_fw_dump() 150 qla2x00_sysfs_read_fw_dump_template(struct file *filp, struct kobject *kobj, in qla2x00_sysfs_read_fw_dump_template() argument 154 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, in qla2x00_sysfs_read_fw_dump_template() 155 struct device, kobj))); in qla2x00_sysfs_read_fw_dump_template() 168 qla2x00_sysfs_write_fw_dump_template(struct file *filp, struct kobject *kobj, in qla2x00_sysfs_write_fw_dump_template() argument [all …]
|
/linux-4.4.14/drivers/misc/eeprom/ |
D | eeprom.c | 83 static ssize_t eeprom_read(struct file *filp, struct kobject *kobj, in eeprom_read() argument 87 struct i2c_client *client = to_i2c_client(container_of(kobj, struct device, kobj)); in eeprom_read() 187 return sysfs_create_bin_file(&client->dev.kobj, &eeprom_attr); in eeprom_probe() 192 sysfs_remove_bin_file(&client->dev.kobj, &eeprom_attr); in eeprom_remove()
|
D | eeprom_93xx46.c | 37 eeprom_93xx46_bin_read(struct file *filp, struct kobject *kobj, in eeprom_93xx46_bin_read() argument 48 dev = container_of(kobj, struct device, kobj); in eeprom_93xx46_bin_read() 185 eeprom_93xx46_bin_write(struct file *filp, struct kobject *kobj, in eeprom_93xx46_bin_write() argument 193 dev = container_of(kobj, struct device, kobj); in eeprom_93xx46_bin_write() 338 err = sysfs_create_bin_file(&spi->dev.kobj, &edev->bin); in eeprom_93xx46_probe() 365 sysfs_remove_bin_file(&spi->dev.kobj, &edev->bin); in eeprom_93xx46_remove()
|
D | at25.c | 135 at25_bin_read(struct file *filp, struct kobject *kobj, in at25_bin_read() argument 142 dev = container_of(kobj, struct device, kobj); in at25_bin_read() 269 at25_bin_write(struct file *filp, struct kobject *kobj, in at25_bin_write() argument 276 dev = container_of(kobj, struct device, kobj); in at25_bin_write() 427 err = sysfs_create_bin_file(&spi->dev.kobj, &at25->bin); in at25_probe() 450 sysfs_remove_bin_file(&spi->dev.kobj, &at25->bin); in at25_remove()
|
D | max6875.c | 109 static ssize_t max6875_read(struct file *filp, struct kobject *kobj, in max6875_read() argument 113 struct i2c_client *client = kobj_to_i2c_client(kobj); in max6875_read() 165 err = sysfs_create_bin_file(&client->dev.kobj, &user_eeprom_attr); in max6875_probe() 184 sysfs_remove_bin_file(&client->dev.kobj, &user_eeprom_attr); in max6875_remove()
|
D | at24.c | 286 static ssize_t at24_bin_read(struct file *filp, struct kobject *kobj, in at24_bin_read() argument 292 at24 = dev_get_drvdata(container_of(kobj, struct device, kobj)); in at24_bin_read() 417 static ssize_t at24_bin_write(struct file *filp, struct kobject *kobj, in at24_bin_write() argument 423 at24 = dev_get_drvdata(container_of(kobj, struct device, kobj)); in at24_bin_write() 630 err = sysfs_create_bin_file(&client->dev.kobj, &at24->bin); in at24_probe() 666 sysfs_remove_bin_file(&client->dev.kobj, &at24->bin); in at24_remove()
|
/linux-4.4.14/drivers/gpu/drm/ |
D | drm_sysfs.c | 251 static ssize_t edid_show(struct file *filp, struct kobject *kobj, in edid_show() argument 255 struct device *connector_dev = container_of(kobj, struct device, kobj); in edid_show() 422 static int kobj_connector_type(struct kobject *kobj) in kobj_connector_type() argument 424 struct device *dev = kobj_to_dev(kobj); in kobj_connector_type() 430 static umode_t connector_is_dvii(struct kobject *kobj, in connector_is_dvii() argument 433 return kobj_connector_type(kobj) == DRM_MODE_CONNECTOR_DVII ? in connector_is_dvii() 437 static umode_t connector_is_tv(struct kobject *kobj, in connector_is_tv() argument 440 switch (kobj_connector_type(kobj)) { in connector_is_tv() 559 kobject_uevent_env(&dev->primary->kdev->kobj, KOBJ_CHANGE, envp); in drm_sysfs_hotplug_event()
|
/linux-4.4.14/drivers/scsi/qla4xxx/ |
D | ql4_attr.c | 13 qla4_8xxx_sysfs_read_fw_dump(struct file *filep, struct kobject *kobj, in qla4_8xxx_sysfs_read_fw_dump() argument 17 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, in qla4_8xxx_sysfs_read_fw_dump() 18 struct device, kobj))); in qla4_8xxx_sysfs_read_fw_dump() 31 qla4_8xxx_sysfs_write_fw_dump(struct file *filep, struct kobject *kobj, in qla4_8xxx_sysfs_write_fw_dump() argument 35 struct scsi_qla_host *ha = to_qla_host(dev_to_shost(container_of(kobj, in qla4_8xxx_sysfs_write_fw_dump() 36 struct device, kobj))); in qla4_8xxx_sysfs_write_fw_dump() 133 ret = sysfs_create_bin_file(&host->shost_gendev.kobj, in qla4_8xxx_alloc_sysfs_attr() 148 sysfs_remove_bin_file(&host->shost_gendev.kobj, in qla4_8xxx_free_sysfs_attr()
|
/linux-4.4.14/fs/exofs/ |
D | sys.c | 33 static ssize_t odev_attr_show(struct kobject *kobj, struct attribute *attr, in odev_attr_show() argument 36 struct exofs_dev *edp = container_of(kobj, struct exofs_dev, ed_kobj); in odev_attr_show() 42 static ssize_t odev_attr_store(struct kobject *kobj, struct attribute *attr, in odev_attr_store() argument 45 struct exofs_dev *edp = container_of(kobj, struct exofs_dev, ed_kobj); in odev_attr_store() 163 &exofs_kset->kobj, "%s_%llx", dt_dev->osdname, pid); in exofs_sysfs_sb_add()
|
/linux-4.4.14/fs/ext4/ |
D | sysfs.c | 251 static ssize_t ext4_attr_show(struct kobject *kobj, in ext4_attr_show() argument 254 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, in ext4_attr_show() 290 static ssize_t ext4_attr_store(struct kobject *kobj, in ext4_attr_store() argument 294 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, in ext4_attr_store() 320 static void ext4_sb_release(struct kobject *kobj) in ext4_sb_release() argument 322 struct ext4_sb_info *sbi = container_of(kobj, struct ext4_sb_info, in ext4_sb_release() 343 .kobj = {.ktype = &ext4_ktype}, 426 kobject_set_name(&ext4_kset.kobj, "ext4"); in ext4_init_sysfs() 427 ext4_kset.kobj.parent = fs_kobj; in ext4_init_sysfs()
|
/linux-4.4.14/drivers/zorro/ |
D | zorro-sysfs.c | 64 static ssize_t zorro_read_config(struct file *filp, struct kobject *kobj, in zorro_read_config() argument 68 struct zorro_dev *z = to_zorro_dev(container_of(kobj, struct device, in zorro_read_config() 69 kobj)); in zorro_read_config() 115 (error = sysfs_create_bin_file(&dev->kobj, &zorro_config_attr))) in zorro_create_sysfs_dev_files()
|
/linux-4.4.14/drivers/char/tpm/ |
D | tpm-chip.c | 137 chip->cdev.kobj.parent = &chip->dev.kobj; in tpmm_chip_alloc() 239 rc = __compat_only_sysfs_link_entry_to_kobj(&chip->pdev->kobj, in tpm_chip_register() 240 &chip->dev.kobj, in tpm_chip_register() 276 sysfs_remove_link(&chip->pdev->kobj, "ppi"); in tpm_chip_unregister()
|
/linux-4.4.14/Documentation/ |
D | kobject.txt | 71 struct kobject kobj; 76 just a matter of using the kobj member. Code that works with kobjects will 95 struct uio_map *u_map = container_of(kp, struct uio_map, kobj); 102 struct kobject kobj; 106 #define to_map(map) container_of(map, struct uio_map, kobj) 111 struct uio_map *map = to_map(kobj); 119 void kobject_init(struct kobject *kobj, struct kobj_type *ktype); 125 int kobject_add(struct kobject *kobj, struct kobject *parent, const char *fmt, ...); 129 kobj->kset must be assigned before calling kobject_add(). If a kset is 138 int kobject_rename(struct kobject *kobj, const char *new_name); [all …]
|
/linux-4.4.14/drivers/staging/speakup/ |
D | kobjects.c | 28 static ssize_t chars_chartab_show(struct kobject *kobj, in chars_chartab_show() argument 108 static ssize_t chars_chartab_store(struct kobject *kobj, in chars_chartab_store() argument 224 static ssize_t keymap_show(struct kobject *kobj, struct kobj_attribute *attr, in keymap_show() argument 260 static ssize_t keymap_store(struct kobject *kobj, struct kobj_attribute *attr, in keymap_store() argument 327 static ssize_t silent_store(struct kobject *kobj, struct kobj_attribute *attr, in silent_store() argument 366 static ssize_t synth_show(struct kobject *kobj, struct kobj_attribute *attr, in synth_show() argument 381 static ssize_t synth_store(struct kobject *kobj, struct kobj_attribute *attr, in synth_store() argument 407 static ssize_t synth_direct_store(struct kobject *kobj, in synth_direct_store() argument 434 static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr, in version_show() argument 450 static ssize_t punc_show(struct kobject *kobj, struct kobj_attribute *attr, in punc_show() argument [all …]
|
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/usb/core/ |
D | sysfs.c | 324 rc = sysfs_add_file_to_group(&dev->kobj, in add_persist_attributes() 333 sysfs_remove_file_from_group(&dev->kobj, in remove_persist_attributes() 611 rc = sysfs_merge_group(&dev->kobj, &power_attr_group); in add_power_attributes() 613 rc = sysfs_merge_group(&dev->kobj, in add_power_attributes() 617 rc = sysfs_merge_group(&dev->kobj, in add_power_attributes() 626 sysfs_unmerge_group(&dev->kobj, &usb2_hardware_lpm_attr_group); in remove_power_attributes() 627 sysfs_unmerge_group(&dev->kobj, &power_attr_group); in remove_power_attributes() 777 static umode_t dev_string_attrs_are_visible(struct kobject *kobj, in dev_string_attrs_are_visible() argument 780 struct device *dev = container_of(kobj, struct device, kobj); in dev_string_attrs_are_visible() 810 read_descriptors(struct file *filp, struct kobject *kobj, in read_descriptors() argument [all …]
|
D | port.c | 218 rc = sysfs_create_link(&left->dev.kobj, &right->dev.kobj, "peer"); in link_peers() 221 rc = sysfs_create_link(&right->dev.kobj, &left->dev.kobj, "peer"); in link_peers() 223 sysfs_remove_link(&left->dev.kobj, "peer"); in link_peers() 298 sysfs_remove_link(&left->dev.kobj, "peer"); in unlink_peers() 300 sysfs_remove_link(&right->dev.kobj, "peer"); in unlink_peers()
|
/linux-4.4.14/drivers/net/wireless/ath/ath10k/ |
D | thermal.c | 177 ret = sysfs_create_link(&ar->dev->kobj, &cdev->device.kobj, in ath10k_thermal_register() 210 sysfs_remove_link(&ar->dev->kobj, "cooling_device"); in ath10k_thermal_register() 218 sysfs_remove_link(&ar->dev->kobj, "cooling_device"); in ath10k_thermal_unregister()
|
/linux-4.4.14/drivers/cpufreq/ |
D | cpufreq.c | 160 return &policy->kobj; in get_governor_parent_kobj() 291 kobject_get(&policy->kobj); in cpufreq_cpu_get() 310 kobject_put(&policy->kobj); in cpufreq_cpu_put() 476 static ssize_t show_boost(struct kobject *kobj, in show_boost() argument 482 static ssize_t store_boost(struct kobject *kobj, struct attribute *attr, in store_boost() argument 811 #define to_policy(k) container_of(k, struct cpufreq_policy, kobj) 814 static ssize_t show(struct kobject *kobj, struct attribute *attr, char *buf) in show() argument 816 struct cpufreq_policy *policy = to_policy(kobj); in show() 832 static ssize_t store(struct kobject *kobj, struct attribute *attr, in store() argument 835 struct cpufreq_policy *policy = to_policy(kobj); in store() [all …]
|
/linux-4.4.14/drivers/platform/x86/ |
D | intel_menlow.c | 176 result = sysfs_create_link(&device->dev.kobj, in intel_menlow_memory_add() 177 &cdev->device.kobj, "thermal_cooling"); in intel_menlow_memory_add() 181 result = sysfs_create_link(&cdev->device.kobj, in intel_menlow_memory_add() 182 &device->dev.kobj, "device"); in intel_menlow_memory_add() 184 sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); in intel_menlow_memory_add() 204 sysfs_remove_link(&device->dev.kobj, "thermal_cooling"); in intel_menlow_memory_remove() 205 sysfs_remove_link(&cdev->device.kobj, "device"); in intel_menlow_memory_remove()
|
/linux-4.4.14/drivers/s390/cio/ |
D | ccwgroup.c | 42 sysfs_remove_link(&gdev->dev.kobj, str); in __ccwgroup_remove_symlinks() 43 sysfs_remove_link(&gdev->cdev[i]->dev.kobj, "group_device"); in __ccwgroup_remove_symlinks() 245 rc = sysfs_create_link(&gdev->cdev[i]->dev.kobj, in __ccwgroup_create_symlinks() 246 &gdev->dev.kobj, "group_device"); in __ccwgroup_create_symlinks() 249 sysfs_remove_link(&gdev->cdev[i]->dev.kobj, in __ccwgroup_create_symlinks() 256 rc = sysfs_create_link(&gdev->dev.kobj, in __ccwgroup_create_symlinks() 257 &gdev->cdev[i]->dev.kobj, str); in __ccwgroup_create_symlinks() 261 sysfs_remove_link(&gdev->dev.kobj, str); in __ccwgroup_create_symlinks() 264 sysfs_remove_link(&gdev->cdev[i]->dev.kobj, in __ccwgroup_create_symlinks()
|
/linux-4.4.14/drivers/staging/lustre/lustre/ptlrpc/ |
D | lproc_ptlrpc.c | 329 static ssize_t threads_min_show(struct kobject *kobj, struct attribute *attr, in threads_min_show() argument 332 struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service, in threads_min_show() 338 static ssize_t threads_min_store(struct kobject *kobj, struct attribute *attr, in threads_min_store() argument 341 struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service, in threads_min_store() 366 static ssize_t threads_started_show(struct kobject *kobj, in threads_started_show() argument 370 struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service, in threads_started_show() 383 static ssize_t threads_max_show(struct kobject *kobj, struct attribute *attr, in threads_max_show() argument 386 struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service, in threads_max_show() 392 static ssize_t threads_max_store(struct kobject *kobj, struct attribute *attr, in threads_max_store() argument 395 struct ptlrpc_service *svc = container_of(kobj, struct ptlrpc_service, in threads_max_store() [all …]
|
/linux-4.4.14/drivers/staging/lustre/lustre/obdclass/ |
D | lprocfs_status.c | 360 static ssize_t uuid_show(struct kobject *kobj, struct attribute *attr, in uuid_show() argument 363 struct obd_device *obd = container_of(kobj, struct obd_device, in uuid_show() 370 static ssize_t blocksize_show(struct kobject *kobj, struct attribute *attr, in blocksize_show() argument 373 struct obd_device *obd = container_of(kobj, struct obd_device, in blocksize_show() 386 static ssize_t kbytestotal_show(struct kobject *kobj, struct attribute *attr, in kbytestotal_show() argument 389 struct obd_device *obd = container_of(kobj, struct obd_device, in kbytestotal_show() 409 static ssize_t kbytesfree_show(struct kobject *kobj, struct attribute *attr, in kbytesfree_show() argument 412 struct obd_device *obd = container_of(kobj, struct obd_device, in kbytesfree_show() 432 static ssize_t kbytesavail_show(struct kobject *kobj, struct attribute *attr, in kbytesavail_show() argument 435 struct obd_device *obd = container_of(kobj, struct obd_device, in kbytesavail_show() [all …]
|
/linux-4.4.14/mm/ |
D | huge_memory.c | 240 static ssize_t double_flag_show(struct kobject *kobj, in double_flag_show() argument 253 static ssize_t double_flag_store(struct kobject *kobj, in double_flag_store() argument 277 static ssize_t enabled_show(struct kobject *kobj, in enabled_show() argument 280 return double_flag_show(kobj, attr, buf, in enabled_show() 284 static ssize_t enabled_store(struct kobject *kobj, in enabled_store() argument 290 ret = double_flag_store(kobj, attr, buf, count, in enabled_store() 310 static ssize_t single_flag_show(struct kobject *kobj, in single_flag_show() argument 318 static ssize_t single_flag_store(struct kobject *kobj, in single_flag_store() argument 345 static ssize_t defrag_show(struct kobject *kobj, in defrag_show() argument 348 return double_flag_show(kobj, attr, buf, in defrag_show() [all …]
|
/linux-4.4.14/fs/ocfs2/cluster/ |
D | sys.c | 38 static ssize_t version_show(struct kobject *kobj, struct kobj_attribute *attr, in version_show() argument 71 ret = sysfs_create_group(&o2cb_kset->kobj, &o2cb_attr_group); in o2cb_sys_init()
|
/linux-4.4.14/arch/powerpc/sysdev/ |
D | mv64x60_pci.c | 28 static ssize_t mv64x60_hs_reg_read(struct file *filp, struct kobject *kobj, in mv64x60_hs_reg_read() argument 49 static ssize_t mv64x60_hs_reg_write(struct file *filp, struct kobject *kobj, in mv64x60_hs_reg_write() argument 100 return sysfs_create_bin_file(&pdev->dev.kobj, &mv64x60_hs_reg_attr); in mv64x60_sysfs_init()
|
/linux-4.4.14/drivers/rapidio/ |
D | rio-sysfs.c | 124 rio_read_config(struct file *filp, struct kobject *kobj, in rio_read_config() argument 129 to_rio_dev(container_of(kobj, struct device, kobj)); in rio_read_config() 196 rio_write_config(struct file *filp, struct kobject *kobj, in rio_write_config() argument 201 to_rio_dev(container_of(kobj, struct device, kobj)); in rio_write_config()
|
/linux-4.4.14/drivers/video/backlight/ |
D | lm3533_bl.c | 239 static umode_t lm3533_bl_attr_is_visible(struct kobject *kobj, in lm3533_bl_attr_is_visible() argument 242 struct device *dev = container_of(kobj, struct device, kobj); in lm3533_bl_attr_is_visible() 326 ret = sysfs_create_group(&bd->dev.kobj, &lm3533_bl_attribute_group); in lm3533_bl_probe() 345 sysfs_remove_group(&bd->dev.kobj, &lm3533_bl_attribute_group); in lm3533_bl_probe() 361 sysfs_remove_group(&bd->dev.kobj, &lm3533_bl_attribute_group); in lm3533_bl_remove()
|
/linux-4.4.14/arch/x86/platform/uv/ |
D | uv_sysfs.c | 28 static ssize_t partition_id_show(struct kobject *kobj, in partition_id_show() argument 34 static ssize_t coherence_id_show(struct kobject *kobj, in coherence_id_show() argument
|
/linux-4.4.14/arch/powerpc/platforms/pseries/ |
D | power.c | 32 static ssize_t auto_poweron_show(struct kobject *kobj, in auto_poweron_show() argument 38 static ssize_t auto_poweron_store(struct kobject *kobj, in auto_poweron_store() argument
|
/linux-4.4.14/drivers/regulator/ |
D | userspace-consumer.c | 137 ret = sysfs_create_group(&pdev->dev.kobj, &attr_group); in regulator_userspace_consumer_probe() 157 sysfs_remove_group(&pdev->dev.kobj, &attr_group); in regulator_userspace_consumer_probe() 166 sysfs_remove_group(&pdev->dev.kobj, &attr_group); in regulator_userspace_consumer_remove()
|
/linux-4.4.14/drivers/s390/net/ |
D | qeth_l3_sys.c | 1016 ret = sysfs_create_group(&dev->kobj, &qeth_l3_device_attr_group); in qeth_l3_create_device_attributes() 1020 ret = sysfs_create_group(&dev->kobj, &qeth_device_ipato_group); in qeth_l3_create_device_attributes() 1022 sysfs_remove_group(&dev->kobj, &qeth_l3_device_attr_group); in qeth_l3_create_device_attributes() 1026 ret = sysfs_create_group(&dev->kobj, &qeth_device_vipa_group); in qeth_l3_create_device_attributes() 1028 sysfs_remove_group(&dev->kobj, &qeth_l3_device_attr_group); in qeth_l3_create_device_attributes() 1029 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); in qeth_l3_create_device_attributes() 1033 ret = sysfs_create_group(&dev->kobj, &qeth_device_rxip_group); in qeth_l3_create_device_attributes() 1035 sysfs_remove_group(&dev->kobj, &qeth_l3_device_attr_group); in qeth_l3_create_device_attributes() 1036 sysfs_remove_group(&dev->kobj, &qeth_device_ipato_group); in qeth_l3_create_device_attributes() 1037 sysfs_remove_group(&dev->kobj, &qeth_device_vipa_group); in qeth_l3_create_device_attributes() [all …]
|