Re: [PATCH] usb: musb: jz4740: Make probe function __init_or_module

From: Paul Cercueil
Date: Sat Jun 08 2019 - 06:25:43 EST


I misunderstood what __init_or_module was for. Please ignore this patch.


Le ven. 7 juin 2019 à 17:57, Paul Cercueil <paul@xxxxxxxxxxxxxxx> a écrit :
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@xxxxxxxxxxxxxxx>
---
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