Lines Matching refs:kobj
394 struct kobject kobj; member
403 #define to_cr(obj) container_of(obj, struct afu_config_record, kobj)
405 static ssize_t vendor_show(struct kobject *kobj, in vendor_show() argument
408 struct afu_config_record *cr = to_cr(kobj); in vendor_show()
413 static ssize_t device_show(struct kobject *kobj, in device_show() argument
416 struct afu_config_record *cr = to_cr(kobj); in device_show()
421 static ssize_t class_show(struct kobject *kobj, in class_show() argument
424 struct afu_config_record *cr = to_cr(kobj); in class_show()
429 static ssize_t afu_read_config(struct file *filp, struct kobject *kobj, in afu_read_config() argument
433 struct afu_config_record *cr = to_cr(kobj); in afu_read_config()
434 struct cxl_afu *afu = to_cxl_afu(container_of(kobj->parent, struct device, kobj)); in afu_read_config()
466 static void release_afu_config_record(struct kobject *kobj) in release_afu_config_record() argument
468 struct afu_config_record *cr = to_cr(kobj); in release_afu_config_record()
508 rc = kobject_init_and_add(&cr->kobj, &afu_config_record_type, in cxl_sysfs_afu_new_cr()
509 &afu->dev.kobj, "cr%i", cr->cr); in cxl_sysfs_afu_new_cr()
513 rc = sysfs_create_bin_file(&cr->kobj, &cr->config_attr); in cxl_sysfs_afu_new_cr()
517 rc = kobject_uevent(&cr->kobj, KOBJ_ADD); in cxl_sysfs_afu_new_cr()
523 sysfs_remove_bin_file(&cr->kobj, &cr->config_attr); in cxl_sysfs_afu_new_cr()
525 kobject_put(&cr->kobj); in cxl_sysfs_afu_new_cr()
541 sysfs_remove_bin_file(&cr->kobj, &cr->config_attr); in cxl_sysfs_afu_remove()
542 kobject_put(&cr->kobj); in cxl_sysfs_afu_remove()