libnvdimm, btt, convert nd_btt_probe() to devm

Pass the device performing the probe so we can use a devm allocation for
the btt superblock.

Cc: Vishal Verma <vishal.l.verma@intel.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
This commit is contained in:
Dan Williams
2016-03-17 18:23:09 -07:00
والد bd032943b5
کامیت e32bc729a3
5فایلهای تغییر یافته به همراه25 افزوده شده و 28 حذف شده

مشاهده پرونده

@@ -197,11 +197,13 @@ struct nd_gen_sb {
u64 nd_sb_checksum(struct nd_gen_sb *sb);
#if IS_ENABLED(CONFIG_BTT)
int nd_btt_probe(struct nd_namespace_common *ndns, void *drvdata);
int nd_btt_probe(struct device *dev, struct nd_namespace_common *ndns,
void *drvdata);
bool is_nd_btt(struct device *dev);
struct device *nd_btt_create(struct nd_region *nd_region);
#else
static inline int nd_btt_probe(struct nd_namespace_common *ndns, void *drvdata)
static inline int nd_btt_probe(struct device *dev,
struct nd_namespace_common *ndns, void *drvdata)
{
return -ENODEV;
}