linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 1/1] auxdisplay: ks0108: Switch to use module_parport_driver()
@ 2021-06-16 14:15 Andy Shevchenko
  2021-07-15 23:46 ` Miguel Ojeda
  0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2021-06-16 14:15 UTC (permalink / raw)
  To: Andy Shevchenko, linux-kernel; +Cc: Miguel Ojeda

Switch to use module_parport_driver() to reduce boilerplate code.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.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@kernel.org>");
 MODULE_DESCRIPTION("ks0108 LCD Controller driver");
-
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH v1 1/1] auxdisplay: ks0108: Switch to use module_parport_driver()
  2021-06-16 14:15 [PATCH v1 1/1] auxdisplay: ks0108: Switch to use module_parport_driver() Andy Shevchenko
@ 2021-07-15 23:46 ` Miguel Ojeda
  0 siblings, 0 replies; 2+ messages in thread
From: Miguel Ojeda @ 2021-07-15 23:46 UTC (permalink / raw)
  To: Andy Shevchenko; +Cc: linux-kernel, Miguel Ojeda

On Wed, Jun 16, 2021 at 4:15 PM Andy Shevchenko
<andriy.shevchenko@linux.intel.com> wrote:
>
> Switch to use module_parport_driver() to reduce boilerplate code.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>

Thanks, queued (without the newline unrelated change at the bottom).

Cheers,
Miguel

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-15 23:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-16 14:15 [PATCH v1 1/1] auxdisplay: ks0108: Switch to use module_parport_driver() Andy Shevchenko
2021-07-15 23:46 ` Miguel Ojeda

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).