linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] nvdimm/of_pmem: Provide a unique name for bus provider
@ 2019-08-07  4:00 Aneesh Kumar K.V
  2019-08-07  4:13 ` Dan Williams
  2019-08-07  5:42 ` Vaibhav Jain
  0 siblings, 2 replies; 7+ messages in thread
From: Aneesh Kumar K.V @ 2019-08-07  4:00 UTC (permalink / raw)
  To: dan.j.williams
  Cc: Oliver O'Halloran, linuxppc-dev, Aneesh Kumar K.V, linux-nvdimm

ndctl utility requires the ndbus to have unique names. If not while
enumerating the bus in userspace it drops bus with similar names.
This results in us not listing devices beneath the bus.

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.ibm.com>
---
 drivers/nvdimm/of_pmem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/nvdimm/of_pmem.c b/drivers/nvdimm/of_pmem.c
index a0c8dcfa0bf9..97187d6c0bdb 100644
--- a/drivers/nvdimm/of_pmem.c
+++ b/drivers/nvdimm/of_pmem.c
@@ -42,7 +42,7 @@ static int of_pmem_region_probe(struct platform_device *pdev)
 		return -ENOMEM;
 
 	priv->bus_desc.attr_groups = bus_attr_groups;
-	priv->bus_desc.provider_name = "of_pmem";
+	priv->bus_desc.provider_name = kstrdup(pdev->name, GFP_KERNEL);
 	priv->bus_desc.module = THIS_MODULE;
 	priv->bus_desc.of_node = np;
 
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2019-08-07 15:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-07  4:00 [PATCH] nvdimm/of_pmem: Provide a unique name for bus provider Aneesh Kumar K.V
2019-08-07  4:13 ` Dan Williams
2019-08-07  4:17   ` Aneesh Kumar K.V
2019-08-07  4:52     ` Dan Williams
2019-08-07  6:00       ` Aneesh Kumar K.V
2019-08-07 15:34         ` Dan Williams
2019-08-07  5:42 ` Vaibhav Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).