diff mbox series

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

Message ID 20210616140432.39406-1-andriy.shevchenko@linux.intel.com (mailing list archive)
State Accepted
Commit 133b6558c75566bf692460fd1a09b3b795ef2c1a
Headers show
Series [v1,1/1] Input: parkbd - switch to use module_parport_driver() | expand

Commit Message

Andy Shevchenko June 16, 2021, 2:04 p.m. UTC
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(-)

Comments

Andy Shevchenko July 13, 2021, 9:56 a.m. UTC | #1
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?
diff mbox series

Patch

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);