Lines Matching refs:kobj

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
460 struct afu_config_record *cr = to_cr(kobj); in class_show()
465 static ssize_t afu_read_config(struct file *filp, struct kobject *kobj, in afu_read_config() argument
469 struct afu_config_record *cr = to_cr(kobj); in afu_read_config()
470 struct cxl_afu *afu = to_cxl_afu(container_of(kobj->parent, struct device, kobj)); in afu_read_config()
497 static void release_afu_config_record(struct kobject *kobj) in release_afu_config_record() argument
499 struct afu_config_record *cr = to_cr(kobj); in release_afu_config_record()
539 rc = kobject_init_and_add(&cr->kobj, &afu_config_record_type, in cxl_sysfs_afu_new_cr()
540 &afu->dev.kobj, "cr%i", cr->cr); in cxl_sysfs_afu_new_cr()
544 rc = sysfs_create_bin_file(&cr->kobj, &cr->config_attr); in cxl_sysfs_afu_new_cr()
548 rc = kobject_uevent(&cr->kobj, KOBJ_ADD); in cxl_sysfs_afu_new_cr()
554 sysfs_remove_bin_file(&cr->kobj, &cr->config_attr); in cxl_sysfs_afu_new_cr()
556 kobject_put(&cr->kobj); in cxl_sysfs_afu_new_cr()
576 sysfs_remove_bin_file(&cr->kobj, &cr->config_attr); in cxl_sysfs_afu_remove()
577 kobject_put(&cr->kobj); in cxl_sysfs_afu_remove()