Message ID | 20220811013008.15883-1-ye.xingchen@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | [linux-next] nvdimm/region:Use the function kobj_to_dev() | expand |
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index 473a71bbd9c9..8130a26dec32 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -721,7 +721,7 @@ REGION_MAPPING(31); static umode_t mapping_visible(struct kobject *kobj, struct attribute *a, int n) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct nd_region *nd_region = to_nd_region(dev); if (n < nd_region->ndr_mappings)