public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] rpmsg: core: Make remove handler for rpmsg driver optional.
@ 2019-01-07 11:38 Pi-Hsun Shih
  2019-01-07 17:30 ` Bjorn Andersson
  0 siblings, 1 reply; 2+ messages in thread
From: Pi-Hsun Shih @ 2019-01-07 11:38 UTC (permalink / raw)
  Cc: Pi-Hsun Shih, Ohad Ben-Cohen, Bjorn Andersson,
	open list:REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM, open list

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>
---
 drivers/rpmsg/rpmsg_core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/rpmsg/rpmsg_core.c b/drivers/rpmsg/rpmsg_core.c
index 8122807db38094..ea88fd4e2a6ecf 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);
 
-- 
2.20.1.97.g81188d93c3-goog


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-01-07 17:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-07 11:38 [PATCH] rpmsg: core: Make remove handler for rpmsg driver optional Pi-Hsun Shih
2019-01-07 17:30 ` Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox