libnvdimm/region: use kobj_to_dev()
PATCH 1/1 libnvdimm/region: use kobj_to_dev()
From: Minghao Chi <[email protected]>
Use kobj_to_dev() instead of open-coding it.
Reported-by Zeal Robot <[email protected]>
Signed-off-by Minghao Chi <[email protected]>
--- drivers/nvdimm/region_devs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/nvdimm/region_devs.c +1 -1
@@ -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)
--
2.25.1