lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1468434589-18610-8-git-send-email-fabf@skynet.be>
Date:	Wed, 13 Jul 2016 20:29:48 +0200
From:	Fabian Frederick <fabf@...net.be>
To:	Samuel Ortiz <samuel@...tiz.org>
Cc:	linux-kernel@...r.kernel.org, irda-users@...ts.sourceforge.net,
	davem@...emloft.net, fabf@...net.be
Subject: [PATCH 7/8 net-next] irda: litelink-sir: use module_sirdev_driver() helper

Avoid using generic init/exit functions.

Signed-off-by: Fabian Frederick <fabf@...net.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@...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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ