Lines Matching defs:nd_region
20 struct nd_region *nd_region = to_nd_region(dev->parent);
25 ida_simple_remove(&nd_region->pfn_ida, nd_pfn->id);
320 static struct nd_pfn *nd_pfn_alloc(struct nd_region *nd_region)
329 nd_pfn->id = ida_simple_get(&nd_region->pfn_ida, 0, 0, GFP_KERNEL);
336 dev_set_name(dev, "pfn%d.%d", nd_region->id, nd_pfn->id);
338 dev->parent = &nd_region->dev;
343 struct device *nd_pfn_create(struct nd_region *nd_region)
348 if (!is_memory(&nd_region->dev))
351 nd_pfn = nd_pfn_alloc(nd_region);
366 struct nd_region *nd_region = to_nd_region(nd_pfn->dev.parent);
394 bb_present = badblocks_check(&nd_region->bb, meta_start,
399 nsoff = ALIGN_DOWN((nd_region->ndr_start
628 struct nd_region *nd_region = to_nd_region(ndns->dev.parent);
642 nd_pfn = nd_pfn_alloc(nd_region);
732 struct nd_region *nd_region;
760 nd_region = to_nd_region(nd_pfn->dev.parent);
761 if (nd_region->ro) {
764 dev_name(&nd_region->dev));