[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210616141548.39787-1-andriy.shevchenko@linux.intel.com>
Date: Wed, 16 Jun 2021 17:15:48 +0300
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
linux-kernel@...r.kernel.org
Cc: Miguel Ojeda <ojeda@...nel.org>
Subject: [PATCH v1 1/1] auxdisplay: ks0108: Switch to use module_parport_driver()
Switch to use module_parport_driver() to reduce boilerplate code.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
---
drivers/auxdisplay/ks0108.c | 15 +--------------
1 file changed, 1 insertion(+), 14 deletions(-)
diff --git a/drivers/auxdisplay/ks0108.c b/drivers/auxdisplay/ks0108.c
index 03c95ad4216c..406bb7376df8 100644
--- a/drivers/auxdisplay/ks0108.c
+++ b/drivers/auxdisplay/ks0108.c
@@ -167,21 +167,8 @@ static struct parport_driver ks0108_parport_driver = {
.detach = ks0108_parport_detach,
.devmodel = true,
};
-
-static int __init ks0108_init(void)
-{
- return parport_register_driver(&ks0108_parport_driver);
-}
-
-static void __exit ks0108_exit(void)
-{
- parport_unregister_driver(&ks0108_parport_driver);
-}
-
-module_init(ks0108_init);
-module_exit(ks0108_exit);
+module_parport_driver(ks0108_parport_driver);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Miguel Ojeda <ojeda@...nel.org>");
MODULE_DESCRIPTION("ks0108 LCD Controller driver");
-
--
2.30.2
Powered by blists - more mailing lists