Skip to content

Commit 28d3fe3

Browse files
Li Zetaodtor
authored andcommitted
Input: walkera0701 - use module_parport_driver macro to simplify the code
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]>
1 parent eb988e4 commit 28d3fe3

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

drivers/input/joystick/walkera0701.c

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -296,15 +296,4 @@ static struct parport_driver walkera0701_parport_driver = {
296296
.devmodel = true,
297297
};
298298

299-
static int __init walkera0701_init(void)
300-
{
301-
return parport_register_driver(&walkera0701_parport_driver);
302-
}
303-
304-
static void __exit walkera0701_exit(void)
305-
{
306-
parport_unregister_driver(&walkera0701_parport_driver);
307-
}
308-
309-
module_init(walkera0701_init);
310-
module_exit(walkera0701_exit);
299+
module_parport_driver(walkera0701_parport_driver);

0 commit comments

Comments
 (0)