Skip to contentSkip to conversation

Input: parkbd - switch to use module_parport_driver()

PATCH In review Andy Shevchenko 1 participant 2 messages Jun 16, 2021 – Jul 13, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Input: parkbd - switch to use module_parport_driver()

Switch to use module_parport_driver() to reduce boilerplate code.

---
 drivers/input/serio/parkbd.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
drivers/input/serio/parkbd.c +1 -13
index 3ac57a91ede4..51b68501896c 100644
@@ -220,16 +220,4 @@ static struct parport_driver parkbd_parport_driver = {
 	.detach = parkbd_detach,
 	.devmodel = true,
 };
-
-static int __init parkbd_init(void)
-{
-	return parport_register_driver(&parkbd_parport_driver);
-}
-
-static void __exit parkbd_exit(void)
-{
-	parport_unregister_driver(&parkbd_parport_driver);
-}
-
-module_init(parkbd_init);
-module_exit(parkbd_exit);
+module_parport_driver(parkbd_parport_driver);
Signature · 1 line
2.30.2
#1 lore raw
Quoted 1 line · Andy Shevchenko

Switch to use module_parport_driver() to reduce boilerplate code.

Any comments on this?

Signature · 2 lines
With Best Regards,
Andy Shevchenko