diff options
author | Dan Williams <dan.j.williams@intel.com> | 2016-03-17 18:16:15 -0700 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2016-04-22 10:59:54 -0700 |
commit | bd032943b5b2b336994171dcebc11531a38b45ba (patch) | |
tree | 3d5d30979a0f8a2c3b3d4e63f3f02d50f0bcf14c /drivers/nvdimm/nd.h | |
parent | 298f2bc5db3851cf2e839a0025425256ef852139 (diff) | |
download | linux-bd032943b5b2b336994171dcebc11531a38b45ba.tar.bz2 |
libnvdimm, pfn, convert nd_pfn_probe() to devm
Pass the device performing the probe so we can use a devm allocation for
the pfn superblock.
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers/nvdimm/nd.h')
-rw-r--r-- | drivers/nvdimm/nd.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/nvdimm/nd.h b/drivers/nvdimm/nd.h index b0a4ab91307b..c831caa3d60a 100644 --- a/drivers/nvdimm/nd.h +++ b/drivers/nvdimm/nd.h @@ -219,12 +219,14 @@ static inline struct device *nd_btt_create(struct nd_region *nd_region) struct nd_pfn *to_nd_pfn(struct device *dev); #if IS_ENABLED(CONFIG_NVDIMM_PFN) -int nd_pfn_probe(struct nd_namespace_common *ndns, void *drvdata); +int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns, + void *drvdata); bool is_nd_pfn(struct device *dev); struct device *nd_pfn_create(struct nd_region *nd_region); int nd_pfn_validate(struct nd_pfn *nd_pfn); #else -static inline int nd_pfn_probe(struct nd_namespace_common *ndns, void *drvdata) +static inline int nd_pfn_probe(struct device *dev, struct nd_namespace_common *ndns, + void *drvdata) { return -ENODEV; } |