From 69485f59ad87c5f3a706248b62c4205e9e659d8b Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 5 Oct 2011 16:10:21 +0200 Subject: [PATCH] use device_(add|remove)_user when replacing devices --- device.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/device.c b/device.c index f9ad25a..76feb68 100644 --- a/device.c +++ b/device.c @@ -337,8 +337,8 @@ device_replace(struct device *dev, struct device *odev) device_set_present(odev, false); list_for_each_entry_safe(dep, tmp, &odev->users, list) { - list_move_tail(&dep->list, &dev->users); - dep->dev = dev; + device_remove_user(dep); + device_add_user(dep, dev); } device_free(odev); -- 2.25.1