rpmsg: core: Make remove handler for rpmsg driver optional.

Most other bus (for example, SPI, i2c) have the remove handler for
driver optional. Make remove handler for rpmsg driver optional too.

Signed-off-by: Pi-Hsun Shih <pihsun@chromium.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
This commit is contained in:
Pi-Hsun Shih 2019-01-07 19:38:32 +08:00 committed by Bjorn Andersson
parent b270ea40b3
commit 54119bc111
1 changed files with 2 additions and 1 deletions

View File

@ -493,6 +493,7 @@ static int rpmsg_dev_remove(struct device *dev)
if (rpdev->ops->announce_destroy)
err = rpdev->ops->announce_destroy(rpdev);
if (rpdrv->remove)
rpdrv->remove(rpdev);
dev_pm_domain_detach(dev, true);