diff options
Diffstat (limited to 'drivers/core')
-rw-r--r-- | drivers/core/device-remove.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c index 586fadee0a..5c8dc4ad70 100644 --- a/drivers/core/device-remove.c +++ b/drivers/core/device-remove.c @@ -16,6 +16,7 @@ #include <dm/uclass.h> #include <dm/uclass-internal.h> #include <dm/util.h> +#include <power-domain.h> int device_chld_unbind(struct udevice *dev, struct driver *drv) { @@ -192,6 +193,10 @@ int device_remove(struct udevice *dev, uint flags) } } + if (!(drv->flags & DM_FLAG_DEFAULT_PD_CTRL_OFF) && + (dev != gd->cur_serial_dev)) + dev_power_domain_off(dev); + if (flags_remove(flags, drv->flags)) { device_free(dev); |