diff options
Diffstat (limited to 'drivers/core/device-remove.c')
-rw-r--r-- | drivers/core/device-remove.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/core/device-remove.c b/drivers/core/device-remove.c index e6ec6ff4212..73d2e9e4208 100644 --- a/drivers/core/device-remove.c +++ b/drivers/core/device-remove.c @@ -207,6 +207,10 @@ int device_remove(struct udevice *dev, uint flags) if (!(dev_get_flags(dev) & DM_FLAG_ACTIVATED)) return 0; + ret = device_notify(dev, EVT_DM_PRE_REMOVE); + if (ret) + return ret; + /* * If the child returns EKEYREJECTED, continue. It just means that it * didn't match the flags. @@ -256,6 +260,10 @@ int device_remove(struct udevice *dev, uint flags) dev_bic_flags(dev, DM_FLAG_ACTIVATED); + ret = device_notify(dev, EVT_DM_POST_REMOVE); + if (ret) + goto err_remove; + return 0; err_remove: |