/drivers/base/ |
D | core.c | 64 #define to_dev(obj) container_of(obj, struct device, kobj) 67 static ssize_t dev_attr_show(struct kobject *kobj, struct attribute *attr, in dev_attr_show() argument 71 struct device *dev = to_dev(kobj); in dev_attr_show() 83 static ssize_t dev_attr_store(struct kobject *kobj, struct attribute *attr, in dev_attr_store() argument 87 struct device *dev = to_dev(kobj); in dev_attr_store() 109 static void device_release(struct kobject *kobj) in device_release() argument 111 struct device *dev = to_dev(kobj); in device_release() 131 static int dev_uevent_filter(struct kset *kset, struct kobject *kobj) in dev_uevent_filter() argument 133 struct kobj_type *ktype = get_ktype(kobj); in dev_uevent_filter() 136 struct device *dev = to_dev(kobj); in dev_uevent_filter() [all …]
|
D | sys.c | 28 #define to_sysdev(k) container_of(k, struct sys_device, kobj) 33 sysdev_show(struct kobject * kobj, struct attribute * attr, char * buffer) in sysdev_show() argument 35 struct sys_device * sysdev = to_sysdev(kobj); in sysdev_show() 45 sysdev_store(struct kobject * kobj, struct attribute * attr, in sysdev_store() argument 48 struct sys_device * sysdev = to_sysdev(kobj); in sysdev_store() 68 return sysfs_create_file(&s->kobj, &a->attr); in sysdev_create_file() 74 sysfs_remove_file(&s->kobj, &a->attr); in sysdev_remove_file() 80 #define to_sysdev_class(k) container_of(k, struct sysdev_class, kset.kobj) 84 static ssize_t sysdev_class_show(struct kobject *kobj, struct attribute *attr, in sysdev_class_show() argument 87 struct sysdev_class * class = to_sysdev_class(kobj); in sysdev_class_show() [all …]
|
D | bus.c | 22 #define to_bus(obj) container_of(obj, struct bus_type_private, subsys.kobj) 49 static ssize_t drv_attr_show(struct kobject *kobj, struct attribute *attr, in drv_attr_show() argument 53 struct driver_private *drv_priv = to_driver(kobj); in drv_attr_show() 61 static ssize_t drv_attr_store(struct kobject *kobj, struct attribute *attr, in drv_attr_store() argument 65 struct driver_private *drv_priv = to_driver(kobj); in drv_attr_store() 78 static void driver_release(struct kobject *kobj) in driver_release() argument 80 struct driver_private *drv_priv = to_driver(kobj); in driver_release() 82 pr_debug("driver: '%s': %s\n", kobject_name(kobj), __func__); in driver_release() 94 static ssize_t bus_attr_show(struct kobject *kobj, struct attribute *attr, in bus_attr_show() argument 98 struct bus_type_private *bus_priv = to_bus(kobj); in bus_attr_show() [all …]
|
D | driver.c | 98 error = sysfs_create_file(&drv->p->kobj, &attr->attr); in driver_create_file() 114 sysfs_remove_file(&drv->p->kobj, &attr->attr); in driver_remove_file() 128 int driver_add_kobj(struct device_driver *drv, struct kobject *kobj, in driver_add_kobj() argument 142 ret = kobject_add(kobj, &drv->p->kobj, "%s", name); in driver_add_kobj() 156 struct kobject *kobj; in get_driver() local 158 kobj = kobject_get(&drv->p->kobj); in get_driver() 159 priv = to_driver(kobj); in get_driver() 172 kobject_put(&drv->p->kobj); in put_driver() 184 error = sysfs_create_group(&drv->p->kobj, groups[i]); in driver_add_groups() 187 sysfs_remove_group(&drv->p->kobj, in driver_add_groups() [all …]
|
D | class.c | 26 static ssize_t class_attr_show(struct kobject *kobj, struct attribute *attr, in class_attr_show() argument 30 struct class_private *cp = to_class(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 class_private *cp = to_class(kobj); in class_attr_store() 50 static void class_release(struct kobject *kobj) in class_release() argument 52 struct class_private *cp = to_class(kobj); in class_release() 82 error = sysfs_create_file(&cls->p->class_subsys.kobj, in class_create_file() 92 sysfs_remove_file(&cls->p->class_subsys.kobj, &attr->attr); in class_remove_file() 166 error = kobject_set_name(&cp->class_subsys.kobj, "%s", cls->name); in __class_register() 179 cp->class_subsys.kobj.kset = class_kset; in __class_register() [all …]
|
D | dd.c | 35 __func__, kobject_name(&dev->kobj)); in driver_bound() 53 ret = sysfs_create_link(&dev->driver->p->kobj, &dev->kobj, in driver_sysfs_add() 54 kobject_name(&dev->kobj)); in driver_sysfs_add() 56 ret = sysfs_create_link(&dev->kobj, &dev->driver->p->kobj, in driver_sysfs_add() 59 sysfs_remove_link(&dev->driver->p->kobj, in driver_sysfs_add() 60 kobject_name(&dev->kobj)); in driver_sysfs_add() 70 sysfs_remove_link(&drv->p->kobj, kobject_name(&dev->kobj)); in driver_sysfs_remove() 71 sysfs_remove_link(&dev->kobj, "driver"); in driver_sysfs_remove()
|
D | module.c | 31 mk->drivers_dir = kobject_create_and_add("drivers", &mk->kobj); in module_create_drivers_dir() 51 mk = container_of(mkobj, struct module_kobject, kobj); in module_add_driver() 63 no_warn = sysfs_create_link(&drv->p->kobj, &mk->kobj, "module"); in module_add_driver() 67 no_warn = sysfs_create_link(mk->drivers_dir, &drv->p->kobj, in module_add_driver() 81 sysfs_remove_link(&drv->p->kobj, "module"); in module_remove_driver()
|
/drivers/edac/ |
D | edac_device_sysfs.c | 21 #define to_edacdev(k) container_of(k, struct edac_device_ctl_info, kobj) 111 #define to_ctl_info(k) container_of(k, struct edac_device_ctl_info, kobj) 115 static ssize_t edac_dev_ctl_info_show(struct kobject *kobj, in edac_dev_ctl_info_show() argument 118 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); in edac_dev_ctl_info_show() 127 static ssize_t edac_dev_ctl_info_store(struct kobject *kobj, in edac_dev_ctl_info_store() argument 131 struct edac_device_ctl_info *edac_dev = to_ctl_info(kobj); in edac_dev_ctl_info_store() 199 static void edac_device_ctrl_master_release(struct kobject *kobj) in edac_device_ctrl_master_release() argument 201 struct edac_device_ctl_info *edac_dev = to_edacdev(kobj); in edac_device_ctrl_master_release() 248 memset(&edac_dev->kobj, 0, sizeof(struct kobject)); in edac_device_register_sysfs_main_kobj() 261 err = kobject_init_and_add(&edac_dev->kobj, &ktype_device_ctrl, in edac_device_register_sysfs_main_kobj() [all …]
|
D | edac_mc_sysfs.c | 217 #define to_csrow(k) container_of(k, struct csrow_info, kobj) 221 static ssize_t csrowdev_show(struct kobject *kobj, in csrowdev_show() argument 224 struct csrow_info *csrow = to_csrow(kobj); in csrowdev_show() 233 static ssize_t csrowdev_store(struct kobject *kobj, struct attribute *attr, in csrowdev_store() argument 236 struct csrow_info *csrow = to_csrow(kobj); in csrowdev_store() 323 static int edac_create_channel_files(struct kobject *kobj, int chan) in edac_create_channel_files() argument 331 err = sysfs_create_file(kobj, in edac_create_channel_files() 337 err = sysfs_create_file(kobj, in edac_create_channel_files() 349 static void edac_csrow_instance_release(struct kobject *kobj) in edac_csrow_instance_release() argument 356 cs = container_of(kobj, struct csrow_info, kobj); in edac_csrow_instance_release() [all …]
|
D | edac_pci_sysfs.c | 72 #define to_instance(k) container_of(k, struct edac_pci_ctl_info, kobj) 76 static void edac_pci_instance_release(struct kobject *kobj) in edac_pci_instance_release() argument 83 pci = to_instance(kobj); in edac_pci_instance_release() 99 static ssize_t edac_pci_instance_show(struct kobject *kobj, in edac_pci_instance_show() argument 102 struct edac_pci_ctl_info *pci = to_instance(kobj); in edac_pci_instance_show() 111 static ssize_t edac_pci_instance_store(struct kobject *kobj, in edac_pci_instance_store() argument 115 struct edac_pci_ctl_info *pci = to_instance(kobj); in edac_pci_instance_store() 176 err = kobject_init_and_add(&pci->kobj, &ktype_pci_instance, in edac_pci_create_instance_kobj() 185 kobject_uevent(&pci->kobj, KOBJ_ADD); in edac_pci_create_instance_kobj() 209 kobject_put(&pci->kobj); in edac_pci_unregister_sysfs_instance_kobj() [all …]
|
/drivers/cpuidle/ |
D | sysfs.c | 141 return sysfs_create_group(&cls->kset.kobj, &cpuclass_attr_group); in cpuidle_add_class_sysfs() 149 sysfs_remove_group(&cls->kset.kobj, &cpuclass_attr_group); in cpuidle_remove_class_sysfs() 163 #define kobj_to_cpuidledev(k) container_of(k, struct cpuidle_device, kobj) 165 static ssize_t cpuidle_show(struct kobject * kobj, struct attribute * attr ,char * buf) in cpuidle_show() argument 168 struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); in cpuidle_show() 179 static ssize_t cpuidle_store(struct kobject * kobj, struct attribute * attr, in cpuidle_store() argument 183 struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); in cpuidle_store() 199 static void cpuidle_sysfs_release(struct kobject *kobj) in cpuidle_sysfs_release() argument 201 struct cpuidle_device *dev = kobj_to_cpuidledev(kobj); in cpuidle_sysfs_release() 264 #define kobj_to_state_obj(k) container_of(k, struct cpuidle_state_kobj, kobj) [all …]
|
/drivers/pci/ |
D | pci-sysfs.c | 244 pci_read_config(struct kobject *kobj, struct bin_attribute *bin_attr, in pci_read_config() argument 247 struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj)); in pci_read_config() 317 pci_write_config(struct kobject *kobj, struct bin_attribute *bin_attr, in pci_write_config() argument 320 struct pci_dev *dev = to_pci_dev(container_of(kobj,struct device,kobj)); in pci_write_config() 374 read_vpd_attr(struct kobject *kobj, struct bin_attribute *bin_attr, in read_vpd_attr() argument 378 to_pci_dev(container_of(kobj, struct device, kobj)); in read_vpd_attr() 389 write_vpd_attr(struct kobject *kobj, struct bin_attribute *bin_attr, in write_vpd_attr() argument 393 to_pci_dev(container_of(kobj, struct device, kobj)); in write_vpd_attr() 415 pci_read_legacy_io(struct kobject *kobj, struct bin_attribute *bin_attr, in pci_read_legacy_io() argument 418 struct pci_bus *bus = to_pci_bus(container_of(kobj, in pci_read_legacy_io() [all …]
|
D | slot.c | 16 static ssize_t pci_slot_attr_show(struct kobject *kobj, in pci_slot_attr_show() argument 19 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_attr_show() 24 static ssize_t pci_slot_attr_store(struct kobject *kobj, in pci_slot_attr_store() argument 27 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_attr_store() 50 static void pci_slot_release(struct kobject *kobj) in pci_slot_release() argument 53 struct pci_slot *slot = to_pci_slot(kobj); in pci_slot_release() 131 result = kobject_rename(&slot->kobj, slot_name); in rename_slot() 145 kobject_get(&slot->kobj); in get_slot() 213 kobject_put(&slot->kobj); in pci_create_slot() 231 slot->kobj.kset = pci_slots_kset; in pci_create_slot() [all …]
|
/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 …]
|
/drivers/scsi/arcmsr/ |
D | arcmsr_attr.c | 62 static ssize_t arcmsr_sysfs_iop_message_read(struct kobject *kobj, in arcmsr_sysfs_iop_message_read() argument 67 struct device *dev = container_of(kobj,struct device,kobj); in arcmsr_sysfs_iop_message_read() 108 static ssize_t arcmsr_sysfs_iop_message_write(struct kobject *kobj, in arcmsr_sysfs_iop_message_write() argument 113 struct device *dev = container_of(kobj,struct device,kobj); in arcmsr_sysfs_iop_message_write() 156 static ssize_t arcmsr_sysfs_iop_message_clear(struct kobject *kobj, in arcmsr_sysfs_iop_message_clear() argument 161 struct device *dev = container_of(kobj,struct device,kobj); in arcmsr_sysfs_iop_message_clear() 220 error = sysfs_create_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_read_attr); in arcmsr_alloc_sysfs_attr() 225 error = sysfs_create_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_write_attr); in arcmsr_alloc_sysfs_attr() 230 error = sysfs_create_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_clear_attr); in arcmsr_alloc_sysfs_attr() 237 sysfs_remove_bin_file(&host->shost_dev.kobj, &arcmsr_sysfs_message_write_attr); in arcmsr_alloc_sysfs_attr() [all …]
|
/drivers/pci/hotplug/ |
D | pci_hotplug_core.c | 428 retval = sysfs_create_file(&slot->kobj, &hotplug_slot_attr_power.attr); in fs_add_slot() 434 retval = sysfs_create_file(&slot->kobj, in fs_add_slot() 441 retval = sysfs_create_file(&slot->kobj, in fs_add_slot() 448 retval = sysfs_create_file(&slot->kobj, in fs_add_slot() 455 retval = sysfs_create_file(&slot->kobj, in fs_add_slot() 462 retval = sysfs_create_file(&slot->kobj, in fs_add_slot() 469 retval = sysfs_create_file(&slot->kobj, in fs_add_slot() 479 sysfs_remove_file(&slot->kobj, &hotplug_slot_attr_cur_bus_speed.attr); in fs_add_slot() 483 sysfs_remove_file(&slot->kobj, &hotplug_slot_attr_max_bus_speed.attr); in fs_add_slot() 487 sysfs_remove_file(&slot->kobj, &hotplug_slot_attr_presence.attr); in fs_add_slot() [all …]
|
/drivers/uwb/ |
D | pal.c | 46 ret = sysfs_create_link(&pal->device->kobj, in uwb_pal_register() 47 &rc->uwb_dev.dev.kobj, "uwb_rc"); in uwb_pal_register() 50 ret = sysfs_create_link(&rc->uwb_dev.dev.kobj, in uwb_pal_register() 51 &pal->device->kobj, pal->name); in uwb_pal_register() 53 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); in uwb_pal_register() 85 sysfs_remove_link(&rc->uwb_dev.dev.kobj, pal->name); in uwb_pal_unregister() 86 sysfs_remove_link(&pal->device->kobj, "uwb_rc"); in uwb_pal_unregister()
|
/drivers/firmware/ |
D | memmap.c | 38 struct kobject kobj; /* kobject for each entry */ member 44 static ssize_t memmap_attr_show(struct kobject *kobj, 114 kobject_init(&entry->kobj, &memmap_ktype); in firmware_map_add_entry() 194 #define to_memmap_entry(obj) container_of(obj, struct firmware_map_entry, kobj) 196 static ssize_t memmap_attr_show(struct kobject *kobj, in memmap_attr_show() argument 199 struct firmware_map_entry *entry = to_memmap_entry(kobj); in memmap_attr_show() 224 entry->kobj.kset = memmap_kset; in memmap_init() 225 if (kobject_add(&entry->kobj, NULL, "%d", i++)) in memmap_init() 226 kobject_put(&entry->kobj); in memmap_init()
|
D | efivars.c | 122 struct kobject kobj; member 140 #define to_efivar_entry(obj) container_of(obj, struct efivar_entry, kobj) 333 static ssize_t efivar_attr_show(struct kobject *kobj, struct attribute *attr, in efivar_attr_show() argument 336 struct efivar_entry *var = to_efivar_entry(kobj); in efivar_attr_show() 349 static ssize_t efivar_attr_store(struct kobject *kobj, struct attribute *attr, in efivar_attr_store() argument 352 struct efivar_entry *var = to_efivar_entry(kobj); in efivar_attr_store() 370 static void efivar_release(struct kobject *kobj) in efivar_release() argument 372 struct efivar_entry *var = container_of(kobj, struct efivar_entry, kobj); in efivar_release() 400 kobject_put(&var->kobj); in efivar_unregister() 404 static ssize_t efivar_create(struct kobject *kobj, in efivar_create() argument [all …]
|
D | iscsi_ibft.c | 248 struct kobject kobj; member 262 struct kobject *kobj; member 324 static void ibft_release(struct kobject *kobj) in ibft_release() argument 327 container_of(kobj, struct ibft_kobject, kobj); in ibft_release() 508 static ssize_t ibft_show_attribute(struct kobject *kobj, in ibft_show_attribute() argument 513 container_of(kobj, struct ibft_kobject, kobj); in ibft_show_attribute() 616 ibft_kobj->kobj.kset = ibft_kset; in ibft_create_kobject() 618 rc = kobject_init_and_add(&ibft_kobj->kobj, &ibft_ktype, in ibft_create_kobject() 626 kobject_uevent(&ibft_kobj->kobj, KOBJ_ADD); in ibft_create_kobject() 638 rc = sysfs_create_link(&ibft_kobj->kobj, in ibft_create_kobject() [all …]
|
/drivers/uio/ |
D | uio.c | 59 struct kobject kobj; member 62 #define to_map(map) container_of(map, struct uio_map, kobj) 99 static void map_release(struct kobject *kobj) in map_release() argument 101 struct uio_map *map = to_map(kobj); in map_release() 105 static ssize_t map_type_show(struct kobject *kobj, struct attribute *attr, in map_type_show() argument 108 struct uio_map *map = to_map(kobj); in map_type_show() 131 struct kobject kobj; member 134 #define to_portio(portio) container_of(portio, struct uio_portio, kobj) 176 static void portio_release(struct kobject *kobj) in portio_release() argument 178 struct uio_portio *portio = to_portio(kobj); in portio_release() [all …]
|
/drivers/message/i2o/ |
D | device.c | 245 rc = sysfs_create_link(&i2o_dev->device.kobj, in i2o_device_add() 246 &tmp->device.kobj, "user"); in i2o_device_add() 255 rc = sysfs_create_link(&tmp->device.kobj, in i2o_device_add() 256 &i2o_dev->device.kobj, "user"); in i2o_device_add() 264 rc = sysfs_create_link(&i2o_dev->device.kobj, in i2o_device_add() 265 &tmp->device.kobj, "parent"); in i2o_device_add() 274 rc = sysfs_create_link(&tmp->device.kobj, in i2o_device_add() 275 &i2o_dev->device.kobj, "parent"); in i2o_device_add() 293 sysfs_remove_link(&tmp->device.kobj, "parent"); in i2o_device_add() 295 sysfs_remove_link(&i2o_dev->device.kobj, "parent"); in i2o_device_add() [all …]
|
/drivers/i2c/chips/ |
D | ds1682.c | 144 static ssize_t ds1682_eeprom_read(struct kobject *kobj, struct bin_attribute *attr, in ds1682_eeprom_read() argument 147 struct i2c_client *client = kobj_to_i2c_client(kobj); in ds1682_eeprom_read() 167 static ssize_t ds1682_eeprom_write(struct kobject *kobj, struct bin_attribute *attr, in ds1682_eeprom_write() argument 170 struct i2c_client *client = kobj_to_i2c_client(kobj); in ds1682_eeprom_write() 214 rc = sysfs_create_group(&client->dev.kobj, &ds1682_group); in ds1682_probe() 218 rc = sysfs_create_bin_file(&client->dev.kobj, &ds1682_eeprom_attr); in ds1682_probe() 225 sysfs_remove_group(&client->dev.kobj, &ds1682_group); in ds1682_probe() 232 sysfs_remove_bin_file(&client->dev.kobj, &ds1682_eeprom_attr); in ds1682_remove() 233 sysfs_remove_group(&client->dev.kobj, &ds1682_group); in ds1682_remove()
|
/drivers/rapidio/ |
D | rio-sysfs.c | 71 rio_read_config(struct kobject *kobj, struct bin_attribute *bin_attr, in rio_read_config() argument 75 to_rio_dev(container_of(kobj, struct device, kobj)); in rio_read_config() 142 rio_write_config(struct kobject *kobj, struct bin_attribute *bin_attr, in rio_write_config() argument 146 to_rio_dev(container_of(kobj, struct device, kobj)); in rio_write_config() 217 sysfs_create_bin_file(&rdev->dev.kobj, &rio_config_attr); in rio_create_sysfs_dev_files() 230 sysfs_remove_bin_file(&rdev->dev.kobj, &rio_config_attr); in rio_remove_sysfs_dev_files()
|
/drivers/scsi/qla2xxx/ |
D | qla_attr.c | 18 qla2x00_sysfs_read_fw_dump(struct kobject *kobj, in qla2x00_sysfs_read_fw_dump() argument 22 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, in qla2x00_sysfs_read_fw_dump() 23 struct device, kobj))); in qla2x00_sysfs_read_fw_dump() 34 qla2x00_sysfs_write_fw_dump(struct kobject *kobj, in qla2x00_sysfs_write_fw_dump() argument 38 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, in qla2x00_sysfs_write_fw_dump() 39 struct device, kobj))); in qla2x00_sysfs_write_fw_dump() 88 qla2x00_sysfs_read_nvram(struct kobject *kobj, in qla2x00_sysfs_read_nvram() argument 92 struct scsi_qla_host *vha = shost_priv(dev_to_shost(container_of(kobj, in qla2x00_sysfs_read_nvram() 93 struct device, kobj))); in qla2x00_sysfs_read_nvram() 105 qla2x00_sysfs_write_nvram(struct kobject *kobj, in qla2x00_sysfs_write_nvram() argument [all …]
|