diff mbox series

rtc: jz4740: Make probe function __init_or_module

Message ID 20190607155438.14342-1-paul@crapouillou.net
State Rejected
Headers show
Series rtc: jz4740: Make probe function __init_or_module | expand

Commit Message

Paul Cercueil June 7, 2019, 3:54 p.m. UTC
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/rtc/rtc-jz4740.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Paul Cercueil June 8, 2019, 10:19 a.m. UTC | #1
I misunderstood what __init_or_module was for. Please ignore this patch.


Le ven. 7 juin 2019 à 17:54, Paul Cercueil <paul@crapouillou.net> 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@crapouillou.net>
> ---
>  drivers/rtc/rtc-jz4740.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
> index 9e7b3a04debc..a20e7dc794dd 100644
> --- a/drivers/rtc/rtc-jz4740.c
> +++ b/drivers/rtc/rtc-jz4740.c
> @@ -303,7 +303,7 @@ static const struct of_device_id 
> jz4740_rtc_of_match[] = {
>  };
>  MODULE_DEVICE_TABLE(of, jz4740_rtc_of_match);
> 
> -static int jz4740_rtc_probe(struct platform_device *pdev)
> +static int __init_or_module jz4740_rtc_probe(struct platform_device 
> *pdev)
>  {
>  	int ret;
>  	struct jz4740_rtc *rtc;
> --
> 2.21.0.593.g511ec345e18
>
diff mbox series

Patch

diff --git a/drivers/rtc/rtc-jz4740.c b/drivers/rtc/rtc-jz4740.c
index 9e7b3a04debc..a20e7dc794dd 100644
--- a/drivers/rtc/rtc-jz4740.c
+++ b/drivers/rtc/rtc-jz4740.c
@@ -303,7 +303,7 @@  static const struct of_device_id jz4740_rtc_of_match[] = {
 };
 MODULE_DEVICE_TABLE(of, jz4740_rtc_of_match);
 
-static int jz4740_rtc_probe(struct platform_device *pdev)
+static int __init_or_module jz4740_rtc_probe(struct platform_device *pdev)
 {
 	int ret;
 	struct jz4740_rtc *rtc;