]> Git Repo - linux.git/commitdiff
Input: walkera0701 - use module_parport_driver macro to simplify the code
authorLi Zetao <[email protected]>
Tue, 15 Aug 2023 20:13:46 +0000 (13:13 -0700)
committerDmitry Torokhov <[email protected]>
Sun, 29 Oct 2023 02:56:46 +0000 (02:56 +0000)
Use the module_parport_driver macro to simplify the code, which is the
same as declaring with module_init() and module_exit().

Signed-off-by: Li Zetao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Dmitry Torokhov <[email protected]>
drivers/input/joystick/walkera0701.c

index 56abc8c6c763a35f92fac92dd15c29bcbe0f791c..27d95d6cf56e342e6d76695a3fa6ed3245e43262 100644 (file)
@@ -296,15 +296,4 @@ static struct parport_driver walkera0701_parport_driver = {
        .devmodel = true,
 };
 
-static int __init walkera0701_init(void)
-{
-       return parport_register_driver(&walkera0701_parport_driver);
-}
-
-static void __exit walkera0701_exit(void)
-{
-       parport_unregister_driver(&walkera0701_parport_driver);
-}
-
-module_init(walkera0701_init);
-module_exit(walkera0701_exit);
+module_parport_driver(walkera0701_parport_driver);
This page took 0.064972 seconds and 4 git commands to generate.