From: Alex Briskin Date: Fri, 25 Aug 2017 16:25:06 +0000 (+0300) Subject: staging: unisys: visorinput: Add module_driver driver registration X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b21bb6d483a6973f8fd034e3aebcce42e64c3463;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git staging: unisys: visorinput: Add module_driver driver registration 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 Acked-by: David Kershner Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/unisys/visorinput/visorinput.c b/drivers/staging/unisys/visorinput/visorinput.c index 26f0b9bd09d9..9d8cbc52de8b 100644 --- a/drivers/staging/unisys/visorinput/visorinput.c +++ b/drivers/staging/unisys/visorinput/visorinput.c @@ -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);