mirror of
https://github.com/torvalds/linux.git
synced 2026-01-25 15:03:52 +08:00
dax: Use device_unregister() in unregister_dax_mapping()
Replace an open-coded device_unregister() sequence with the helper. Signed-off-by: Dan Williams <dan.j.williams@intel.com> Link: https://lore.kernel.org/r/168577283989.1672036.7777592498865470652.stgit@dwillia2-xfh.jf.intel.com Reviewed-by: Dave Jiang <dave.jiang@intel.com> Reviewed-by: Fan Ni <fan.ni@samsung.com> Reviewed-by: Ira Weiny <ira.weiny@intel.com> Signed-off-by: Vishal Verma <vishal.l.verma@intel.com>
This commit is contained in:
committed by
Vishal Verma
parent
6d24b170a9
commit
82b4ceeccb
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user