public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] usb: musb: jz4740: Make probe function __init_or_module
@ 2019-06-07 15:57 Paul Cercueil
  2019-06-08 10:21 ` Paul Cercueil
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Cercueil @ 2019-06-07 15:57 UTC (permalink / raw)
  To: Bin Liu; +Cc: od, linux-usb, linux-kernel, Paul Cercueil

This allows the probe function to be dropped after the kernel finished
its initialization, in the case where the driver was not compiled as a
module.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
---
 drivers/usb/musb/jz4740.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/usb/musb/jz4740.c b/drivers/usb/musb/jz4740.c
index 5261f8dfedec..c881f6d14752 100644
--- a/drivers/usb/musb/jz4740.c
+++ b/drivers/usb/musb/jz4740.c
@@ -105,7 +105,7 @@ static const struct musb_platform_ops jz4740_musb_ops = {
 	.init		= jz4740_musb_init,
 };
 
-static int jz4740_probe(struct platform_device *pdev)
+static int __init_or_module jz4740_probe(struct platform_device *pdev)
 {
 	struct musb_hdrc_platform_data	*pdata = &jz4740_musb_platform_data;
 	struct platform_device		*musb;
@@ -174,7 +174,7 @@ static int jz4740_probe(struct platform_device *pdev)
 	return ret;
 }
 
-static int jz4740_remove(struct platform_device *pdev)
+static int __exit jz4740_remove(struct platform_device *pdev)
 {
 	struct jz4740_glue	*glue = platform_get_drvdata(pdev);
 
-- 
2.21.0.593.g511ec345e18


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

end of thread, other threads:[~2019-06-08 10:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-07 15:57 [PATCH] usb: musb: jz4740: Make probe function __init_or_module Paul Cercueil
2019-06-08 10:21 ` Paul Cercueil

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