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] [day] [month] [year] [list]
Message-Id: <1468434589-18610-4-git-send-email-fabf@skynet.be>
Date:	Wed, 13 Jul 2016 20:29:44 +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 3/8 net-next] irda: mcp2120-sir: use module_sirdev_driver() helper

Avoid using generic init/exit functions.

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

diff --git a/drivers/net/irda/mcp2120-sir.c b/drivers/net/irda/mcp2120-sir.c
index 2e33f91..015d434 100644
--- a/drivers/net/irda/mcp2120-sir.c
+++ b/drivers/net/irda/mcp2120-sir.c
@@ -49,16 +49,6 @@ static struct dongle_driver mcp2120 = {
 	.set_speed	= mcp2120_change_speed,
 };
 
-static int __init mcp2120_sir_init(void)
-{
-	return irda_register_dongle(&mcp2120);
-}
-
-static void __exit mcp2120_sir_cleanup(void)
-{
-	irda_unregister_dongle(&mcp2120);
-}
-
 static int mcp2120_open(struct sir_dev *dev)
 {
 	struct qos_info *qos = &dev->qos;
@@ -215,10 +205,9 @@ static int mcp2120_reset(struct sir_dev *dev)
 	return (delay > 0) ? delay : ret;
 }
 
+module_sirdev_driver(mcp2120);
+
 MODULE_AUTHOR("Felix Tang <tangf@...tap.org>");
 MODULE_DESCRIPTION("Microchip MCP2120");
 MODULE_LICENSE("GPL");
 MODULE_ALIAS("irda-dongle-9"); /* IRDA_MCP2120_DONGLE */
-
-module_init(mcp2120_sir_init);
-module_exit(mcp2120_sir_cleanup);
-- 
2.8.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ