summaryrefslogtreecommitdiff
path: root/include/linux/libnvdimm.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2016-07-21 20:03:19 -0700
committerDan Williams <dan.j.williams@intel.com>2016-07-21 20:03:19 -0700
commitbc9775d8697f57b333b6b316fb5145d6ca9dc36d (patch)
tree2eea64bed76f443a644ff078d2b2413a1dde29ce /include/linux/libnvdimm.h
parente7a11b449e6e2e2caadf6792c7afeecd68800651 (diff)
libnvdimm: move ->module to struct nvdimm_bus_descriptor
Let the provider module be explicitly passed in rather than implicitly assumed by the module that calls nvdimm_bus_register(). This is in preparation for unifying the nfit and nfit_test driver teardown paths. Reviewed-by: Lee, Chun-Yi <jlee@suse.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'include/linux/libnvdimm.h')
-rw-r--r--include/linux/libnvdimm.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/linux/libnvdimm.h b/include/linux/libnvdimm.h
index d37fda6dd64c..2ab869dece4a 100644
--- a/include/linux/libnvdimm.h
+++ b/include/linux/libnvdimm.h
@@ -70,6 +70,7 @@ struct nd_mapping {
struct nvdimm_bus_descriptor {
const struct attribute_group **attr_groups;
unsigned long cmd_mask;
+ struct module *module;
char *provider_name;
ndctl_fn ndctl;
int (*flush_probe)(struct nvdimm_bus_descriptor *nd_desc);
@@ -128,10 +129,8 @@ static inline struct nd_blk_region_desc *to_blk_region_desc(
}
int nvdimm_bus_add_poison(struct nvdimm_bus *nvdimm_bus, u64 addr, u64 length);
-struct nvdimm_bus *__nvdimm_bus_register(struct device *parent,
- struct nvdimm_bus_descriptor *nfit_desc, struct module *module);
-#define nvdimm_bus_register(parent, desc) \
- __nvdimm_bus_register(parent, desc, THIS_MODULE)
+struct nvdimm_bus *nvdimm_bus_register(struct device *parent,
+ struct nvdimm_bus_descriptor *nfit_desc);
void nvdimm_bus_unregister(struct nvdimm_bus *nvdimm_bus);
struct nvdimm_bus *to_nvdimm_bus(struct device *dev);
struct nvdimm *to_nvdimm(struct device *dev);