diff mbox series

[1/3] libnvdimm, claim: remove static attribute of nd_detach_and_reset

Message ID 1536560508-24564-2-git-send-email-oceanhehy@gmail.com (mailing list archive)
State New, archived
Headers show
Series libnvdimm: reset seeds for next namespace creation | expand

Commit Message

Ocean He Sept. 10, 2018, 6:21 a.m. UTC
From: Ocean He <hehy1@lenovo.com>

The function nd_detach_and_reset needs to be called externally, so
remove the static attribute and declare it in nd-core.h.

Signed-off-by: Ocean He <hehy1@lenovo.com>
---
 drivers/nvdimm/claim.c   | 2 +-
 drivers/nvdimm/nd-core.h | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/drivers/nvdimm/claim.c b/drivers/nvdimm/claim.c
index fb667bf..46e56ecf 100644
--- a/drivers/nvdimm/claim.c
+++ b/drivers/nvdimm/claim.c
@@ -117,7 +117,7 @@  struct nd_pfn *to_nd_pfn_safe(struct device *dev)
 	return NULL;
 }
 
-static void nd_detach_and_reset(struct device *dev,
+void nd_detach_and_reset(struct device *dev,
 		struct nd_namespace_common **_ndns)
 {
 	/* detach the namespace and destroy / reset the device */
diff --git a/drivers/nvdimm/nd-core.h b/drivers/nvdimm/nd-core.h
index ac68072..7fd74d0 100644
--- a/drivers/nvdimm/nd-core.h
+++ b/drivers/nvdimm/nd-core.h
@@ -123,6 +123,7 @@  struct resource *nsblk_add_resource(struct nd_region *nd_region,
 resource_size_t __nvdimm_namespace_capacity(struct nd_namespace_common *ndns);
 void nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns);
 void __nd_detach_ndns(struct device *dev, struct nd_namespace_common **_ndns);
+void nd_detach_and_reset(struct device *dev, struct nd_namespace_common **_ndns);
 bool nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach,
 		struct nd_namespace_common **_ndns);
 bool __nd_attach_ndns(struct device *dev, struct nd_namespace_common *attach,