summaryrefslogtreecommitdiffstats
path: root/drivers/core/device-remove.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/core/device-remove.c')
-rw-r--r--drivers/core/device-remove.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c
index 444e34b492..ff5b28cb6a 100644
--- a/drivers/core/device-remove.c
+++ b/drivers/core/device-remove.c
@@ -194,8 +194,9 @@ int device_remove(struct udevice *dev, uint flags)
}
}
- if (!(drv->flags & DM_FLAG_DEFAULT_PD_CTRL_OFF) &&
- (dev != gd->cur_serial_dev))
+ if (!(drv->flags &
+ (DM_FLAG_DEFAULT_PD_CTRL_OFF | DM_FLAG_REMOVE_WITH_PD_ON)) &&
+ dev != gd->cur_serial_dev)
dev_power_domain_off(dev);
if (flags_remove(flags, drv->flags)) {