Skip to content

Commit 82b4cee

Browse files
djbwstellarhopper
authored andcommitted
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>
1 parent 6d24b17 commit 82b4cee

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/dax/bus.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -657,8 +657,7 @@ static void unregister_dax_mapping(void *data)
657657
dev_dax->ranges[mapping->range_id].mapping = NULL;
658658
mapping->range_id = -1;
659659

660-
device_del(dev);
661-
put_device(dev);
660+
device_unregister(dev);
662661
}
663662

664663
static struct dev_dax_range *get_dax_range(struct device *dev)

0 commit comments

Comments
 (0)