diff options
author | Dan Williams <dan.j.williams@intel.com> | 2018-04-09 19:50:08 +0200 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2018-04-09 19:50:08 +0200 |
commit | 1ed41b5696ccc3ff40a1dee39fe14eff273faf82 (patch) | |
tree | 1202df08129d350a65cf220406eb7ce87185d813 /drivers/nvdimm/region_devs.c | |
parent | Linux 4.16-rc7 (diff) | |
parent | libnvdimm, of_pmem: workaround OF_NUMA=n build error (diff) | |
download | linux-1ed41b5696ccc3ff40a1dee39fe14eff273faf82.tar.xz linux-1ed41b5696ccc3ff40a1dee39fe14eff273faf82.zip |
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); |