Commit 82b4ceec authored by Dan Williams's avatar Dan Williams Committed by Vishal Verma

dax: Use device_unregister() in unregister_dax_mapping()

Replace an open-coded device_unregister() sequence with the helper.
Signed-off-by: default avatarDan Williams <dan.j.williams@intel.com>
Link: https://lore.kernel.org/r/168577283989.1672036.7777592498865470652.stgit@dwillia2-xfh.jf.intel.comReviewed-by: default avatarDave Jiang <dave.jiang@intel.com>
Reviewed-by: default avatarFan Ni <fan.ni@samsung.com>
Reviewed-by: default avatarIra Weiny <ira.weiny@intel.com>
Signed-off-by: default avatarVishal Verma <vishal.l.verma@intel.com>
parent 6d24b170
......@@ -657,8 +657,7 @@ static void unregister_dax_mapping(void *data)
dev_dax->ranges[mapping->range_id].mapping = NULL;
mapping->range_id = -1;
device_del(dev);
put_device(dev);
device_unregister(dev);
}
static struct dev_dax_range *get_dax_range(struct device *dev)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment