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:
parent
b270ea40b3
commit
54119bc111
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user