summaryrefslogtreecommitdiff
path: root/drivers/nvdimm/of_pmem.c
diff options
context:
space:
mode:
authorRob Herring <robh@kernel.org>2018-04-16 19:58:16 +0300
committerDan Williams <dan.j.williams@intel.com>2018-04-20 01:07:10 +0300
commitdf3f126482dba8e00cdbfc8fc44a05a5a35b1704 (patch)
treeb061b55d4c8bcb086a043184259bb7fff44dc58b /drivers/nvdimm/of_pmem.c
parent9484e12d7999a3c82d8732b60c0149f038bdd985 (diff)
downloadlinux-df3f126482dba8e00cdbfc8fc44a05a5a35b1704.tar.xz
libnvdimm, of_pmem: use dev_to_node() instead of of_node_to_nid()
Remove the direct dependency on of_node_to_nid() by using dev_to_node() instead. Any DT platform device will have its NUMA node id set when the device is created. With this, commit 291717b6fbdb ("libnvdimm, of_pmem: workaround OF_NUMA=n build error") can be reverted. Fixes: 717197608952 ("libnvdimm: Add device-tree based driver") Cc: Dan Williams <dan.j.williams@intel.com> Cc: Oliver O'Halloran <oohall@gmail.com> Cc: linux-nvdimm@lists.01.org Signed-off-by: Rob Herring <robh@kernel.org> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/of_pmem.c')
-rw-r--r--drivers/nvdimm/of_pmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/nvdimm/of_pmem.c b/drivers/nvdimm/of_pmem.c
index 85013bad35de..0a701837dfc0 100644
--- a/drivers/nvdimm/of_pmem.c
+++ b/drivers/nvdimm/of_pmem.c
@@ -67,7 +67,7 @@ static int of_pmem_region_probe(struct platform_device *pdev)
*/
memset(&ndr_desc, 0, sizeof(ndr_desc));
ndr_desc.attr_groups = region_attr_groups;
- ndr_desc.numa_node = of_node_to_nid(np);
+ ndr_desc.numa_node = dev_to_node(&pdev->dev);
ndr_desc.res = &pdev->resource[i];
ndr_desc.of_node = np;
set_bit(ND_REGION_PAGEMAP, &ndr_desc.flags);