diff options
author | Pi-Hsun Shih <pihsun@chromium.org> | 2019-01-07 12:38:32 +0100 |
---|---|---|
committer | Bjorn Andersson <bjorn.andersson@linaro.org> | 2019-05-22 08:54:06 +0200 |
commit | 54119bc1110dab2fa389f45c73a0787b8e037e8b (patch) | |
tree | aa10d1f7245c823deb7450908cf78837a2bae672 /drivers/rpmsg | |
parent | dt-bindings: soc: qcom: Add remote-pid binding for GLINK SMEM (diff) | |
download | linux-54119bc1110dab2fa389f45c73a0787b8e037e8b.tar.xz linux-54119bc1110dab2fa389f45c73a0787b8e037e8b.zip |
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>
Diffstat (limited to 'drivers/rpmsg')
-rw-r--r-- | drivers/rpmsg/rpmsg_core.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c index 8122807db380..ea88fd4e2a6e 100644 --- a/drivers/rpmsg/rpmsg_core.c +++ b/drivers/rpmsg/rpmsg_core.c @@ -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); |