From 243f29fe449bbead69076ad861dbe8f51b42c4d7 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Mon, 2 Apr 2018 13:14:25 -0700 Subject: libnvdimm: add an api to cast a 'struct nd_region' to its 'struct device' For debug, it is useful for bus providers to be able to retrieve the 'struct device' associated with an nd_region instance that it registered. We already have to_nd_region() to perform the reverse cast operation, in fact its duplicate declaration can be removed from the private drivers/nvdimm/nd.h header. Reviewed-by: Dave Jiang Signed-off-by: Dan Williams --- drivers/nvdimm/nd.h | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/nvdimm/nd.h') diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h index 8d6375ee0fda..9dad5d737309 100644 --- a/drivers/nvdimm/nd.h +++ b/drivers/nvdimm/nd.h @@ -341,7 +341,6 @@ static inline struct device *nd_dax_create(struct nd_region *nd_region) } #endif -struct nd_region *to_nd_region(struct device *dev); int nd_region_to_nstype(struct nd_region *nd_region); int nd_region_register_namespaces(struct nd_region *nd_region, int *err); u64 nd_region_interleave_set_cookie(struct nd_region *nd_region, -- cgit v1.2.3