Message ID | 20220512011707.1621619-1-chi.minghao@zte.com.cn (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | libnvdimm/region: use kobj_to_dev() | expand |
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index 0cb274c2b508..d1bd82a3a500 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -720,7 +720,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)