Replace an open-coded device_unregister() sequence with the helper.

Signed-off-by: Dan Williams <[email protected]>
---
 drivers/dax/bus.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c
index aee695f86b44..c99ea08aafc3 100644
--- a/drivers/dax/bus.c
+++ b/drivers/dax/bus.c
@@ -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)


Reply via email to