diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-07-21 23:03:19 -0400 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-07-21 23:03:19 -0400 |
commit | bc9775d8697f57b333b6b316fb5145d6ca9dc36d (patch) | |
tree | 2eea64bed76f443a644ff078d2b2413a1dde29ce /include/linux/libnvdimm.h | |
parent | e7a11b449e6e2e2caadf6792c7afeecd68800651 (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.h | 7 |
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 { | |||
70 | struct nvdimm_bus_descriptor { | 70 | struct nvdimm_bus_descriptor { |
71 | const struct attribute_group **attr_groups; | 71 | const struct attribute_group **attr_groups; |
72 | unsigned long cmd_mask; | 72 | unsigned long cmd_mask; |
73 | struct module *module; | ||
73 | char *provider_name; | 74 | char *provider_name; |
74 | ndctl_fn ndctl; | 75 | ndctl_fn ndctl; |
75 | int (*flush_probe)(struct nvdimm_bus_descriptor *nd_desc); | 76 | int (*flush_probe)(struct nvdimm_bus_descriptor *nd_desc); |
@@ -128,10 +129,8 @@ static inline struct nd_blk_region_desc *to_blk_region_desc( | |||
128 | } | 129 | } |
129 | 130 | ||
130 | int nvdimm_bus_add_poison(struct nvdimm_bus *nvdimm_bus, u64 addr, u64 length); | 131 | int nvdimm_bus_add_poison(struct nvdimm_bus *nvdimm_bus, u64 addr, u64 length); |
131 | struct nvdimm_bus *__nvdimm_bus_register(struct device *parent, | 132 | struct nvdimm_bus *nvdimm_bus_register(struct device *parent, |
132 | struct nvdimm_bus_descriptor *nfit_desc, struct module *module); | 133 | struct nvdimm_bus_descriptor *nfit_desc); |
133 | #define nvdimm_bus_register(parent, desc) \ | ||
134 | __nvdimm_bus_register(parent, desc, THIS_MODULE) | ||
135 | void nvdimm_bus_unregister(struct nvdimm_bus *nvdimm_bus); | 134 | void nvdimm_bus_unregister(struct nvdimm_bus *nvdimm_bus); |
136 | struct nvdimm_bus *to_nvdimm_bus(struct device *dev); | 135 | struct nvdimm_bus *to_nvdimm_bus(struct device *dev); |
137 | struct nvdimm *to_nvdimm(struct device *dev); | 136 | struct nvdimm *to_nvdimm(struct device *dev); |