Lines Matching defs:nd_region
19 struct nd_region *nd_region = to_nd_region(dev->parent);
24 ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id);
316 static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region)
325 nd_pfn->id = ida_simple_get(&nd_region->pfn_ida, 0, 0, GFP_KERNEL);
332 dev_set_name(dev, "pfn%d.%d", nd_region->id, nd_pfn->id);
334 dev->parent = &nd_region->dev;
339 struct device *nd_pfn_create(struct nd_region *nd_region)
344 if (!is_memory(&nd_region->dev))
347 nd_pfn = nd_pfn_alloc(nd_region);
362 struct nd_region *nd_region = to_nd_region(nd_pfn->dev.parent);
390 bb_present = badblocks_check(&nd_region->bb, meta_start,
395 nsoff = ALIGN_DOWN((nd_region->ndr_start
619 struct nd_region *nd_region = to_nd_region(ndns->dev.parent);
633 nd_pfn = nd_pfn_alloc(nd_region);
723 struct nd_region *nd_region;
751 nd_region = to_nd_region(nd_pfn->dev.parent);
752 if (nd_region->ro) {
755 dev_name(&nd_region->dev));