diff options
Diffstat (limited to 'drivers/misc/cxl/sysfs.c')
-rw-r--r-- | drivers/misc/cxl/sysfs.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/misc/cxl/sysfs.c b/drivers/misc/cxl/sysfs.c index 02006f7109a8..038af5d45145 100644 --- a/drivers/misc/cxl/sysfs.c +++ b/drivers/misc/cxl/sysfs.c | |||
@@ -386,8 +386,7 @@ static ssize_t afu_eb_read(struct file *filp, struct kobject *kobj, | |||
386 | struct bin_attribute *bin_attr, char *buf, | 386 | struct bin_attribute *bin_attr, char *buf, |
387 | loff_t off, size_t count) | 387 | loff_t off, size_t count) |
388 | { | 388 | { |
389 | struct cxl_afu *afu = to_cxl_afu(container_of(kobj, | 389 | struct cxl_afu *afu = to_cxl_afu(kobj_to_dev(kobj)); |
390 | struct device, kobj)); | ||
391 | 390 | ||
392 | return cxl_afu_read_err_buffer(afu, buf, off, count); | 391 | return cxl_afu_read_err_buffer(afu, buf, off, count); |
393 | } | 392 | } |
@@ -467,7 +466,7 @@ static ssize_t afu_read_config(struct file *filp, struct kobject *kobj, | |||
467 | loff_t off, size_t count) | 466 | loff_t off, size_t count) |
468 | { | 467 | { |
469 | struct afu_config_record *cr = to_cr(kobj); | 468 | struct afu_config_record *cr = to_cr(kobj); |
470 | struct cxl_afu *afu = to_cxl_afu(container_of(kobj->parent, struct device, kobj)); | 469 | struct cxl_afu *afu = to_cxl_afu(kobj_to_dev(kobj->parent)); |
471 | 470 | ||
472 | u64 i, j, val; | 471 | u64 i, j, val; |
473 | 472 | ||