New device does not need to be set present as device_check_state called via device_init
sets the device present after probing the kernel device
Signed-off-by: Hans Dedecker <dedeckeh@gmail.com>
device_replace(struct device *dev, struct device *odev)
{
struct device_user *dep, *tmp;
- bool present = odev->present;
__devlock++;
- if (present)
+ if (odev->present)
device_set_present(odev, false);
list_for_each_entry_safe(dep, tmp, &odev->users.list, list.list) {
__devlock--;
device_free(odev);
-
- if (present)
- device_set_present(dev, true);
}
void