newport_con: make module's init & exit static using module_driver
authorJiri Slaby <jslaby@suse.cz>
Tue, 18 Aug 2020 08:56:50 +0000 (10:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Aug 2020 11:51:18 +0000 (13:51 +0200)
The compiler complains that newport_console_init and
newport_console_exit are not declared:
   drivers/video/console/newport_con.c:745:12: warning: no previous prototype for 'newport_console_init'
   drivers/video/console/newport_con.c:750:13: warning: no previous prototype for 'newport_console_exit'

Here, it translates into: they should be marked static. Do so by
converting the simple un/registration to module_driver().

Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Cc: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Cc: dri-devel@lists.freedesktop.org
Cc: linux-fbdev@vger.kernel.org
Cc: linux-mips@vger.kernel.org
Link: https://lore.kernel.org/r/20200818085655.12071-3-jslaby@suse.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/video/console/newport_con.c

index 4d91103..0d09890 100644 (file)
@@ -751,18 +751,6 @@ static struct gio_driver newport_driver = {
        .probe = newport_probe,
        .remove = newport_remove,
 };
-
-int __init newport_console_init(void)
-{
-       return gio_register_driver(&newport_driver);
-}
-
-void __exit newport_console_exit(void)
-{
-       gio_unregister_driver(&newport_driver);
-}
-
-module_init(newport_console_init);
-module_exit(newport_console_exit);
+module_driver(newport_driver, gio_register_driver, gio_unregister_driver);
 
 MODULE_LICENSE("GPL");