Commit 54119bc1 authored by Pi-Hsun Shih's avatar Pi-Hsun Shih Committed by Bjorn Andersson

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: default avatarPi-Hsun Shih <pihsun@chromium.org>
Signed-off-by: default avatarBjorn Andersson <bjorn.andersson@linaro.org>
parent b270ea40
......@@ -493,7 +493,8 @@ static int rpmsg_dev_remove(struct device *dev)
if (rpdev->ops->announce_destroy)
err = rpdev->ops->announce_destroy(rpdev);
rpdrv->remove(rpdev);
if (rpdrv->remove)
rpdrv->remove(rpdev);
dev_pm_domain_detach(dev, true);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment