staging: unisys: visorinput: Add module_driver driver registration
authorAlex Briskin <br.shurik@gmail.com>
Fri, 25 Aug 2017 16:25:06 +0000 (19:25 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Aug 2017 08:27:29 +0000 (10:27 +0200)
1. Remove module_init()/module_exit() macroes and
visorbus_register_visor_driver/visorbus_unregister_visor_driver
functions.
2. Replace with a short module_driver macro

Signed-off-by: Alex Briskin <br.shurik@gmail.com>
Acked-by: David Kershner <david.kershner@unisys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/unisys/visorinput/visorinput.c

index 26f0b9bd09d9f52c12e14b5938ce92a9a8f3ce8d..9d8cbc52de8b2efebf679d750fa713361607b215 100644 (file)
@@ -727,18 +727,8 @@ static struct visor_driver visorinput_driver = {
        .resume = visorinput_resume,
 };
 
-static int visorinput_init(void)
-{
-       return visorbus_register_visor_driver(&visorinput_driver);
-}
-
-static void visorinput_cleanup(void)
-{
-       visorbus_unregister_visor_driver(&visorinput_driver);
-}
-
-module_init(visorinput_init);
-module_exit(visorinput_cleanup);
+module_driver(visorinput_driver, visorbus_register_visor_driver,
+             visorbus_unregister_visor_driver);
 
 MODULE_DEVICE_TABLE(visorbus, visorinput_channel_types);