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

Subsystems: input (keyboard, mouse, joystick, touchscreen) drivers, the rest

STALE1880d LANDED

Landed in mainline as 133b6558c755 on 2021-07-19.

2 messages, 1 author, 2021-07-13 · open the first message on its own page

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

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-06-16 14:04:15

Switch to use module_parport_driver() to reduce boilerplate code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/input/serio/parkbd.c | 14 +-------------
 1 file changed, 1 insertion(+), 13 deletions(-)
diff --git a/drivers/input/serio/parkbd.c b/drivers/input/serio/parkbd.c
index 3ac57a91ede4..51b68501896c 100644
--- a/drivers/input/serio/parkbd.c
+++ b/drivers/input/serio/parkbd.c
@@ -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);
-- 
2.30.2

Re: [PATCH v1 1/1] Input: parkbd - switch to use module_parport_driver()

From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Date: 2021-07-13 09:56:50

On Wed, Jun 16, 2021 at 05:04:32PM +0300, Andy Shevchenko wrote:
Switch to use module_parport_driver() to reduce boilerplate code.
Any comments on this?

-- 
With Best Regards,
Andy Shevchenko

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help