Skip to contentSkip to conversation

auxdisplay: ks0108: Switch to use module_parport_driver()

PATCH In review Andy Shevchenko 2 participants 2 messages Jun 16, 2021 – Jul 15, 2021

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

PATCH 1/1 auxdisplay: ks0108: Switch to use module_parport_driver()

Switch to use module_parport_driver() to reduce boilerplate code.

---
 drivers/auxdisplay/ks0108.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/auxdisplay/ks0108.c +1 -14
index 03c95ad4216c..406bb7376df8 100644
@@ -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 <[email protected]>");
 MODULE_DESCRIPTION("ks0108 LCD Controller driver");
-
Signature · 1 line
2.30.2