diff mbox series

[-next] Input: walkera0701 - Use module_parport_driver macro to simplify the code

Message ID 20230815080107.1089401-1-lizetao1@huawei.com
State Accepted
Commit 28d3fe32354701decc3e76d89712569c269b5e4f
Headers show
Series [-next] Input: walkera0701 - Use module_parport_driver macro to simplify the code | expand

Commit Message

Li Zetao Aug. 15, 2023, 8:01 a.m. UTC
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 <lizetao1@huawei.com>
---
 drivers/input/joystick/walkera0701.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
diff mbox series

Patch

diff --git a/drivers/input/joystick/walkera0701.c b/drivers/input/joystick/walkera0701.c
index 56abc8c6c763..27d95d6cf56e 100644
--- a/drivers/input/joystick/walkera0701.c
+++ b/drivers/input/joystick/walkera0701.c
@@ -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);