linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fabian Frederick <fabf@skynet.be>
To: Samuel Ortiz <samuel@sortiz.org>
Cc: linux-kernel@vger.kernel.org, irda-users@lists.sourceforge.net,
	davem@davemloft.net, fabf@skynet.be
Subject: [PATCH 7/8 net-next] irda: litelink-sir: use module_sirdev_driver() helper
Date: Wed, 13 Jul 2016 20:29:48 +0200	[thread overview]
Message-ID: <1468434589-18610-8-git-send-email-fabf@skynet.be> (raw)
In-Reply-To: <1468434589-18610-1-git-send-email-fabf@skynet.be>

Avoid using generic init/exit functions.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 drivers/net/irda/litelink-sir.c | 28 ++--------------------------
 1 file changed, 2 insertions(+), 26 deletions(-)

diff --git a/drivers/net/irda/litelink-sir.c b/drivers/net/irda/litelink-sir.c
index 8eefcb4..541fe7c 100644
--- a/drivers/net/irda/litelink-sir.c
+++ b/drivers/net/irda/litelink-sir.c
@@ -62,16 +62,6 @@ static struct dongle_driver litelink = {
 	.set_speed	= litelink_change_speed,
 };
 
-static int __init litelink_sir_init(void)
-{
-	return irda_register_dongle(&litelink);
-}
-
-static void __exit litelink_sir_cleanup(void)
-{
-	irda_unregister_dongle(&litelink);
-}
-
 static int litelink_open(struct sir_dev *dev)
 {
 	struct qos_info *qos = &dev->qos;
@@ -177,23 +167,9 @@ static int litelink_reset(struct sir_dev *dev)
 	return 0;
 }
 
+module_sirdev_driver(litelink);
+
 MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no>");
 MODULE_DESCRIPTION("Parallax Litelink dongle driver");	
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("irda-dongle-5"); /* IRDA_LITELINK_DONGLE */
-
-/*
- * Function init_module (void)
- *
- *    Initialize Litelink module
- *
- */
-module_init(litelink_sir_init);
-
-/*
- * Function cleanup_module (void)
- *
- *    Cleanup Litelink module
- *
- */
-module_exit(litelink_sir_cleanup);
-- 
2.8.1

  parent reply	other threads:[~2016-07-13 18:31 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-13 18:29 [PATCH 0/8 net-next] irda: use module_driver in a new helper Fabian Frederick
2016-07-13 18:29 ` [PATCH 1/8 net-next] irda: sir-dev: add module_sirdev_driver() helper Fabian Frederick
2016-07-13 18:29 ` [PATCH 2/8 net-next] irda: actl200l-sir: use " Fabian Frederick
2016-07-13 18:29 ` [PATCH 3/8 net-next] irda: mcp2120-sir: " Fabian Frederick
2016-07-13 18:29 ` [PATCH 4/8 net-next] irda: esi-sir: " Fabian Frederick
2016-07-13 18:29 ` [PATCH 5/8 net-next] irda: girbil-sir: " Fabian Frederick
2016-07-13 18:29 ` [PATCH 6/8 net-next] irda: old_belkin-sir: " Fabian Frederick
2016-07-13 18:29 ` Fabian Frederick [this message]
2016-07-13 18:29 ` [PATCH 8/8 net-next] irda: ma600-sir: " Fabian Frederick

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1468434589-18610-8-git-send-email-fabf@skynet.be \
    --to=fabf@skynet.be \
    --cc=davem@davemloft.net \
    --cc=irda-users@lists.sourceforge.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=samuel@sortiz.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).