/linux-3.4.99/lib/ |
D | kobject.c | 30 static int populate_dir(struct kobject *kobj) in populate_dir() argument 32 struct kobj_type *t = get_ktype(kobj); in populate_dir() 39 error = sysfs_create_file(kobj, attr); in populate_dir() 47 static int create_dir(struct kobject *kobj) in create_dir() argument 50 if (kobject_name(kobj)) { in create_dir() 51 error = sysfs_create_dir(kobj); in create_dir() 53 error = populate_dir(kobj); in create_dir() 55 sysfs_remove_dir(kobj); in create_dir() 61 static int get_kobj_path_length(struct kobject *kobj) in get_kobj_path_length() argument 64 struct kobject *parent = kobj; in get_kobj_path_length() [all …]
|
D | kobject_uevent.c | 91 struct kobject *kobj = data; in kobj_bcast_filter() local 94 ops = kobj_ns_ops(kobj); in kobj_bcast_filter() 97 ns = kobj->ktype->namespace(kobj); in kobj_bcast_filter() 106 static int kobj_usermode_filter(struct kobject *kobj) in kobj_usermode_filter() argument 110 ops = kobj_ns_ops(kobj); in kobj_usermode_filter() 113 ns = kobj->ktype->namespace(kobj); in kobj_usermode_filter() 131 int kobject_uevent_env(struct kobject *kobj, enum kobject_action action, in kobject_uevent_env() argument 148 kobject_name(kobj), kobj, __func__); in kobject_uevent_env() 151 top_kobj = kobj; in kobject_uevent_env() 157 "without kset!\n", kobject_name(kobj), kobj, in kobject_uevent_env() [all …]
|
/linux-3.4.99/include/linux/ |
D | sysfs.h | 122 int sysfs_schedule_callback(struct kobject *kobj, void (*func)(void *), 125 int __must_check sysfs_create_dir(struct kobject *kobj); 126 void sysfs_remove_dir(struct kobject *kobj); 127 int __must_check sysfs_rename_dir(struct kobject *kobj, const char *new_name); 128 int __must_check sysfs_move_dir(struct kobject *kobj, 131 int __must_check sysfs_create_file(struct kobject *kobj, 133 int __must_check sysfs_create_files(struct kobject *kobj, 135 int __must_check sysfs_chmod_file(struct kobject *kobj, 137 void sysfs_remove_file(struct kobject *kobj, const struct attribute *attr); 138 void sysfs_remove_files(struct kobject *kobj, const struct attribute **attr); [all …]
|
D | kobject.h | 76 int kobject_set_name(struct kobject *kobj, const char *name, ...); 77 extern int kobject_set_name_vargs(struct kobject *kobj, const char *fmt, 80 static inline const char *kobject_name(const struct kobject *kobj) in kobject_name() argument 82 return kobj->name; in kobject_name() 85 extern void kobject_init(struct kobject *kobj, struct kobj_type *ktype); 87 int kobject_add(struct kobject *kobj, struct kobject *parent, 90 int kobject_init_and_add(struct kobject *kobj, 94 extern void kobject_del(struct kobject *kobj); 103 extern struct kobject *kobject_get(struct kobject *kobj); 104 extern void kobject_put(struct kobject *kobj); [all …]
|
/linux-3.4.99/fs/sysfs/ |
D | group.c | 19 static void remove_files(struct sysfs_dirent *dir_sd, struct kobject *kobj, in remove_files() argument 29 static int create_files(struct sysfs_dirent *dir_sd, struct kobject *kobj, in create_files() argument 44 mode = grp->is_visible(kobj, *attr, i); in create_files() 54 remove_files(dir_sd, kobj, grp); in create_files() 59 static int internal_create_group(struct kobject *kobj, int update, in internal_create_group() argument 65 BUG_ON(!kobj || (!update && !kobj->sd)); in internal_create_group() 68 if (unlikely(update && !kobj->sd)) in internal_create_group() 72 kobj->name, grp->name ? "" : grp->name); in internal_create_group() 76 error = sysfs_create_subdir(kobj, grp->name, &sd); in internal_create_group() 80 sd = kobj->sd; in internal_create_group() [all …]
|
D | file.c | 70 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; in fill_read_buffer() local 85 count = ops->show(kobj, attr_sd->s_attr.attr, buffer->page); in fill_read_buffer() 194 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; in flush_write_buffer() local 202 rc = ops->store(kobj, attr_sd->s_attr.attr, buffer->page, count); in flush_write_buffer() 329 struct kobject *kobj = attr_sd->s_parent->s_dir.kobj; in sysfs_open_file() local 339 if (kobj->ktype && kobj->ktype->sysfs_ops) in sysfs_open_file() 340 ops = kobj->ktype->sysfs_ops; in sysfs_open_file() 343 "kobject: %s\n", kobject_name(kobj)); in sysfs_open_file() 488 int sysfs_attr_ns(struct kobject *kobj, const struct attribute *attr, in sysfs_attr_ns() argument 491 struct sysfs_dirent *dir_sd = kobj->sd; in sysfs_attr_ns() [all …]
|
D | symlink.c | 24 static int sysfs_do_create_link(struct kobject *kobj, struct kobject *target, in sysfs_do_create_link() argument 36 if (!kobj) in sysfs_do_create_link() 39 parent_sd = kobj->sd; in sysfs_do_create_link() 104 int sysfs_create_link(struct kobject *kobj, struct kobject *target, in sysfs_create_link() argument 107 return sysfs_do_create_link(kobj, target, name, 1); in sysfs_create_link() 119 int sysfs_create_link_nowarn(struct kobject *kobj, struct kobject *target, in sysfs_create_link_nowarn() argument 122 return sysfs_do_create_link(kobj, target, name, 0); in sysfs_create_link_nowarn() 134 void sysfs_delete_link(struct kobject *kobj, struct kobject *targ, in sysfs_delete_link() argument 139 if (targ->sd && sysfs_ns_type(kobj->sd)) in sysfs_delete_link() 142 sysfs_hash_and_remove(kobj->sd, ns, name); in sysfs_delete_link() [all …]
|
/linux-3.4.99/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_mc_sysfs.c | 208 #define to_csrow(k) container_of(k, struct csrow_info, kobj) 212 static ssize_t csrowdev_show(struct kobject *kobj, in csrowdev_show() argument 215 struct csrow_info *csrow = to_csrow(kobj); in csrowdev_show() 224 static ssize_t csrowdev_store(struct kobject *kobj, struct attribute *attr, in csrowdev_store() argument 227 struct csrow_info *csrow = to_csrow(kobj); in csrowdev_store() 314 static int edac_create_channel_files(struct kobject *kobj, int chan) in edac_create_channel_files() argument 322 err = sysfs_create_file(kobj, in edac_create_channel_files() 328 err = sysfs_create_file(kobj, in edac_create_channel_files() 340 static void edac_csrow_instance_release(struct kobject *kobj) in edac_csrow_instance_release() argument 347 cs = container_of(kobj, struct csrow_info, kobj); in edac_csrow_instance_release() [all …]
|
/linux-3.4.99/drivers/pci/hotplug/ |
D | fakephp.c | 26 struct kobject kobj; member 33 static ssize_t legacy_show(struct kobject *kobj, struct attribute *attr, in legacy_show() argument 36 struct legacy_slot *slot = container_of(kobj, typeof(*slot), kobj); in legacy_show() 46 static ssize_t legacy_store(struct kobject *kobj, struct attribute *attr, in legacy_store() argument 49 struct legacy_slot *slot = container_of(kobj, typeof(*slot), kobj); in legacy_store() 58 sysfs_schedule_callback(&slot->dev->dev.kobj, remove_callback, in legacy_store() 68 static void legacy_release(struct kobject *kobj) in legacy_release() argument 70 struct legacy_slot *slot = container_of(kobj, typeof(*slot), kobj); in legacy_release() 91 if (kobject_init_and_add(&slot->kobj, &legacy_ktype, in legacy_add_slot() 92 &pci_slots_kset->kobj, "%s", in legacy_add_slot() [all …]
|
/linux-3.4.99/drivers/base/ |
D | core.c | 87 #define to_dev(obj) container_of(obj, struct device, kobj) 90 static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, in dev_attr_show() argument 94 struct device *dev = to_dev(kobj); in dev_attr_show() 106 static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr, in dev_attr_store() argument 110 struct device *dev = to_dev(kobj); in dev_attr_store() 182 static void device_release(struct kobject *kobj) in device_release() argument 184 struct device *dev = to_dev(kobj); in device_release() 200 static const void *device_namespace(struct kobject *kobj) in device_namespace() argument 202 struct device *dev = to_dev(kobj); in device_namespace() 218 static int dev_uevent_filter(struct kset *kset, struct kobject *kobj) in dev_uevent_filter() argument [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 const void *class_attr_namespace(struct kobject *kobj, in class_attr_namespace() argument 54 struct subsys_private *cp = to_subsys_private(kobj); in class_attr_namespace() 62 static void class_release(struct kobject *kobj) in class_release() argument 64 struct subsys_private *cp = to_subsys_private(kobj); in class_release() 78 static const struct kobj_ns_type_operations *class_child_ns_type(struct kobject *kobj) in class_child_ns_type() argument 80 struct subsys_private *cp = to_subsys_private(kobj); in class_child_ns_type() [all …]
|
/linux-3.4.99/drivers/w1/slaves/ |
D | w1_ds2408.c | 75 struct file *filp, struct kobject *kobj, in w1_f29_read_state() argument 79 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in w1_f29_read_state() 81 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in w1_f29_read_state() 84 return _read_reg(kobj_to_w1_slave(kobj), W1_F29_REG_LOGIG_STATE, buf); in w1_f29_read_state() 88 struct file *filp, struct kobject *kobj, in w1_f29_read_output() argument 92 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in w1_f29_read_output() 94 bin_attr->attr.name, kobj, (unsigned int)off, count, buf); in w1_f29_read_output() 97 return _read_reg(kobj_to_w1_slave(kobj), in w1_f29_read_output() 102 struct file *filp, struct kobject *kobj, in w1_f29_read_activity() argument 106 dev_dbg(&kobj_to_w1_slave(kobj)->dev, in w1_f29_read_activity() [all …]
|
/linux-3.4.99/drivers/cpuidle/ |
D | sysfs.c | 146 return sysfs_create_group(&dev->kobj, &cpuidle_attr_group); in cpuidle_add_interface() 154 sysfs_remove_group(&dev->kobj, &cpuidle_attr_group); in cpuidle_remove_interface() 168 #define kobj_to_cpuidledev(k) container_of(k, struct cpuidle_device, kobj) 170 static ssize_t cpuidle_show(struct kobject * kobj, struct attribute * attr ,char * buf) in cpuidle_show() argument 173 struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); in cpuidle_show() 184 static ssize_t cpuidle_store(struct kobject * kobj, struct attribute * attr, in cpuidle_store() argument 188 struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); in cpuidle_store() 204 static void cpuidle_sysfs_release(struct kobject *kobj) in cpuidle_sysfs_release() argument 206 struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); in cpuidle_sysfs_release() 298 #define kobj_to_state_obj(k) container_of(k, struct cpuidle_state_kobj, kobj) [all …]
|
/linux-3.4.99/drivers/pci/ |
D | slot.c | 18 static ssize_t pci_slot_attr_show(struct kobject *kobj, in pci_slot_attr_show() argument 21 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_attr_show() 26 static ssize_t pci_slot_attr_store(struct kobject *kobj, in pci_slot_attr_store() argument 29 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_attr_store() 101 static void pci_slot_release(struct kobject *kobj) in pci_slot_release() argument 104 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_release() 188 result = kobject_rename(&slot->kobj, slot_name); in rename_slot() 202 kobject_get(&slot->kobj); in get_slot() 270 kobject_put(&slot->kobj); in pci_create_slot() 288 slot->kobj.kset = pci_slots_kset; in pci_create_slot() [all …]
|
D | pci-sysfs.c | 428 pci_read_config(struct file *filp, struct kobject *kobj, in pci_read_config() argument 432 struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj)); in pci_read_config() 502 pci_write_config(struct file* filp, struct kobject *kobj, in pci_write_config() argument 506 struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj)); in pci_write_config() 560 read_vpd_attr(struct file *filp, struct kobject *kobj, in read_vpd_attr() argument 565 to_pci_dev(container_of(kobj, struct device, kobj)); in read_vpd_attr() 576 write_vpd_attr(struct file *filp, struct kobject *kobj, in write_vpd_attr() argument 581 to_pci_dev(container_of(kobj, struct device, kobj)); in write_vpd_attr() 605 pci_read_legacy_io(struct file *filp, struct kobject *kobj, in pci_read_legacy_io() argument 609 struct pci_bus *bus = to_pci_bus(container_of(kobj, in pci_read_legacy_io() [all …]
|
/linux-3.4.99/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() 205 foo->kobj.kset = example_kset; in create_foo_obj() 213 retval = kobject_init_and_add(&foo->kobj, &foo_ktype, NULL, "%s", name); in create_foo_obj() [all …]
|
/linux-3.4.99/net/batman-adv/ |
D | bat_sysfs.c | 33 struct device *dev = container_of(obj->parent, struct device, kobj); in kobj_to_netdev() 67 ssize_t store_##_name(struct kobject *kobj, struct attribute *attr, \ 70 struct net_device *net_dev = kobj_to_netdev(kobj); \ 77 ssize_t show_##_name(struct kobject *kobj, struct attribute *attr, \ 80 struct bat_priv *bat_priv = kobj_to_batpriv(kobj); \ 94 ssize_t store_##_name(struct kobject *kobj, struct attribute *attr, \ 97 struct net_device *net_dev = kobj_to_netdev(kobj); \ 104 ssize_t show_##_name(struct kobject *kobj, struct attribute *attr, \ 107 struct bat_priv *bat_priv = kobj_to_batpriv(kobj); \ 223 static ssize_t show_vis_mode(struct kobject *kobj, struct attribute *attr, in show_vis_mode() argument [all …]
|
/linux-3.4.99/kernel/ |
D | ksysfs.c | 31 static ssize_t uevent_seqnum_show(struct kobject *kobj, in uevent_seqnum_show() argument 39 static ssize_t uevent_helper_show(struct kobject *kobj, in uevent_helper_show() argument 44 static ssize_t uevent_helper_store(struct kobject *kobj, in uevent_helper_store() argument 60 static ssize_t profiling_show(struct kobject *kobj, in profiling_show() argument 65 static ssize_t profiling_store(struct kobject *kobj, in profiling_store() argument 91 static ssize_t kexec_loaded_show(struct kobject *kobj, in kexec_loaded_show() argument 98 static ssize_t kexec_crash_loaded_show(struct kobject *kobj, in kexec_crash_loaded_show() argument 105 static ssize_t kexec_crash_size_show(struct kobject *kobj, in kexec_crash_size_show() argument 110 static ssize_t kexec_crash_size_store(struct kobject *kobj, in kexec_crash_size_store() argument 125 static ssize_t vmcoreinfo_show(struct kobject *kobj, in vmcoreinfo_show() argument [all …]
|
/linux-3.4.99/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 …]
|
/linux-3.4.99/fs/ |
D | char_dev.c | 282 kobject_set_name(&cdev->kobj, "%s", name); in __register_chrdev() 292 kobject_put(&cdev->kobj); in __register_chrdev() 347 struct kobject *kobj; in cdev_get() local 351 kobj = kobject_get(&p->kobj); in cdev_get() 352 if (!kobj) in cdev_get() 354 return kobj; in cdev_get() 361 kobject_put(&p->kobj); in cdev_put() 378 struct kobject *kobj; in chrdev_open() local 381 kobj = kobj_lookup(cdev_map, inode->i_rdev, &idx); in chrdev_open() 382 if (!kobj) in chrdev_open() [all …]
|
/linux-3.4.99/drivers/parisc/ |
D | pdc_stable.c | 106 struct kobject kobj; member 137 #define to_pdcspath_entry(obj) container_of(obj, struct pdcspath_entry, kobj) 336 sysfs_remove_link(&entry->kobj, "device"); in pdcspath_hwpath_write() 337 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-3.4.99/arch/ia64/kernel/ |
D | topology.c | 129 struct kobject kobj; member 135 struct kobject kobj; member 275 #define to_object(k) container_of(k, struct cache_info, kobj) 278 static ssize_t cache_show(struct kobject * kobj, struct attribute * attr, char * buf) in cache_show() argument 281 struct cache_info *this_leaf = to_object(kobj); in cache_show() 306 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); in cpu_cache_sysfs_exit() 348 memset(&all_cpu_cache_info[cpu].kobj, 0, sizeof(struct kobject)); in cpu_cache_sysfs_init() 362 if (all_cpu_cache_info[cpu].kobj.parent) in cache_add_dev() 375 retval = kobject_init_and_add(&all_cpu_cache_info[cpu].kobj, in cache_add_dev() 376 &cache_ktype_percpu_entry, &sys_dev->kobj, in cache_add_dev() [all …]
|
/linux-3.4.99/drivers/uwb/ |
D | pal.c | 47 ret = sysfs_create_link(&pal->device->kobj, in uwb_pal_register() 48 &rc->uwb_dev.dev.kobj, "uwb_rc"); in uwb_pal_register() 51 ret = sysfs_create_link(&rc->uwb_dev.dev.kobj, in uwb_pal_register() 52 &pal->device->kobj, pal->name); in uwb_pal_register() 54 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); in uwb_pal_register() 86 sysfs_remove_link(&rc->uwb_dev.dev.kobj, pal->name); in uwb_pal_unregister() 87 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); in uwb_pal_unregister()
|
/linux-3.4.99/drivers/hid/ |
D | hid-roccat-koneplus.c | 194 static ssize_t koneplus_sysfs_read(struct file *fp, struct kobject *kobj, in koneplus_sysfs_read() argument 199 container_of(kobj, struct device, kobj)->parent->parent; in koneplus_sysfs_read() 220 static ssize_t koneplus_sysfs_write(struct file *fp, struct kobject *kobj, in koneplus_sysfs_write() argument 225 container_of(kobj, struct device, kobj)->parent->parent; in koneplus_sysfs_write() 244 struct kobject *kobj, struct bin_attribute *attr, char *buf, in koneplus_sysfs_write_talk() argument 247 return koneplus_sysfs_write(fp, kobj, buf, off, count, in koneplus_sysfs_write_talk() 252 struct kobject *kobj, struct bin_attribute *attr, char *buf, in koneplus_sysfs_write_macro() argument 255 return koneplus_sysfs_write(fp, kobj, buf, off, count, in koneplus_sysfs_write_macro() 260 struct kobject *kobj, struct bin_attribute *attr, char *buf, in koneplus_sysfs_read_sensor() argument 263 return koneplus_sysfs_read(fp, kobj, buf, off, count, in koneplus_sysfs_read_sensor() [all …]
|