diff options
author | Dan Williams <dan.j.williams@intel.com> | 2018-04-09 20:50:08 +0300 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-04-09 20:50:08 +0300 |
commit | 1ed41b5696ccc3ff40a1dee39fe14eff273faf82 (patch) | |
tree | 1202df08129d350a65cf220406eb7ce87185d813 /drivers/nvdimm/region_devs.c | |
parent | 3eb2ce825ea1ad89d20f7a3b5780df850e4be274 (diff) | |
parent | 291717b6fbdb175da88ae2144fc58d63a490128d (diff) | |
download | linux-1ed41b5696ccc3ff40a1dee39fe14eff273faf82.tar.xz |
Merge branch 'for-4.17/libnvdimm' into libnvdimm-for-next
Diffstat (limited to 'drivers/nvdimm/region_devs.c')
-rw-r--r-- | drivers/nvdimm/region_devs.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/nvdimm/region_devs.c b/drivers/nvdimm/region_devs.c index 1593e1806b16..a612be6f019d 100644 --- a/drivers/nvdimm/region_devs.c +++ b/drivers/nvdimm/region_devs.c @@ -182,6 +182,14 @@ struct nd_region *to_nd_region(struct device *dev) } EXPORT_SYMBOL_GPL(to_nd_region); +struct device *nd_region_dev(struct nd_region *nd_region) +{ + if (!nd_region) + return NULL; + return &nd_region->dev; +} +EXPORT_SYMBOL_GPL(nd_region_dev); + struct nd_blk_region *to_nd_blk_region(struct device *dev) { struct nd_region *nd_region = to_nd_region(dev); @@ -1014,6 +1022,7 @@ static struct nd_region *nd_region_create(struct nvdimm_bus *nvdimm_bus, dev->parent = &nvdimm_bus->dev; dev->type = dev_type; dev->groups = ndr_desc->attr_groups; + dev->of_node = ndr_desc->of_node; nd_region->ndr_size = resource_size(ndr_desc->res); nd_region->ndr_start = ndr_desc->res->start; nd_device_register(dev); |