Lines Matching refs:nd_region
148 void nvdimm_region_notify(struct nd_region *nd_region, enum nvdimm_event event)
150 struct nvdimm_bus *nvdimm_bus = walk_to_nvdimm_bus(&nd_region->dev);
156 nd_device_notify(&nd_region->dev, event);
167 struct nd_region *nd_region;
175 nd_region = to_nd_region(dev);
176 ndr_end = nd_region->ndr_start + nd_region->ndr_size - 1;
179 if (ctx->phys < nd_region->ndr_start ||
183 sector = (ctx->phys - nd_region->ndr_start) / 512;
184 badblocks_clear(&nd_region->bb, sector, ctx->cleared / 512);
186 if (nd_region->bb_state)
187 sysfs_notify_dirent(nd_region->bb_state);
626 struct nd_region *nd_region = to_nd_region(dev->parent);
630 if (disk_ro == nd_region->ro)
634 dev_name(&nd_region->dev), nd_region->ro ? "only" : "write",
635 disk->disk_name, nd_region->ro ? "only" : "write");
636 set_disk_ro(disk, nd_region->ro);
678 struct nd_region *nd_region = NULL;
681 nd_region = to_nd_region(dev);
683 nd_region = to_nd_region(parent);
685 if (!nd_region)
687 return nd_region->target_node;