rtc: rv3029: annotate init and exit functions
authorAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 23 Dec 2019 10:14:30 +0000 (11:14 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 23 Dec 2019 10:16:23 +0000 (11:16 +0100)
rv30{2,4}9_register_driver and rv30{2,4}9_unregister_driver are only called
from the init and exit functions of the module. Annotate them properly.

Link: https://lore.kernel.org/r/20191223101430.1091572-1-alexandre.belloni@bootlin.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-rv3029c2.c

index ca67604825243a6553b07bdf4613d88643267cdb..786c063611af3b5e5b34ac3374031842eac1902c 100644 (file)
@@ -833,7 +833,7 @@ static struct i2c_driver rv3029_driver = {
        .id_table       = rv3029_id,
 };
 
-static int rv3029_register_driver(void)
+static int __init rv3029_register_driver(void)
 {
        return i2c_add_driver(&rv3029_driver);
 }
@@ -845,7 +845,7 @@ static void rv3029_unregister_driver(void)
 
 #else
 
-static int rv3029_register_driver(void)
+static int __init rv3029_register_driver(void)
 {
        return 0;
 }
@@ -879,24 +879,24 @@ static struct spi_driver rv3049_driver = {
        .probe   = rv3049_probe,
 };
 
-static int rv3049_register_driver(void)
+static int __init rv3049_register_driver(void)
 {
        return spi_register_driver(&rv3049_driver);
 }
 
-static void rv3049_unregister_driver(void)
+static void __exit rv3049_unregister_driver(void)
 {
        spi_unregister_driver(&rv3049_driver);
 }
 
 #else
 
-static int rv3049_register_driver(void)
+static int __init rv3049_register_driver(void)
 {
        return 0;
 }
 
-static void rv3049_unregister_driver(void)
+static void __exit rv3049_unregister_driver(void)
 {
 }