[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1468434589-18610-6-git-send-email-fabf@skynet.be>
Date: Wed, 13 Jul 2016 20:29:46 +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 5/8 net-next] irda: girbil-sir: use module_sirdev_driver() helper
Avoid using generic init/exit functions.
Signed-off-by: Fabian Frederick <fabf@...net.be>
---
drivers/net/irda/girbil-sir.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/drivers/net/irda/girbil-sir.c b/drivers/net/irda/girbil-sir.c
index 7e0a5b8..a0bc4ac 100644
--- a/drivers/net/irda/girbil-sir.c
+++ b/drivers/net/irda/girbil-sir.c
@@ -72,16 +72,6 @@ static struct dongle_driver girbil = {
.set_speed = girbil_change_speed,
};
-static int __init girbil_sir_init(void)
-{
- return irda_register_dongle(&girbil);
-}
-
-static void __exit girbil_sir_cleanup(void)
-{
- irda_unregister_dongle(&girbil);
-}
-
static int girbil_open(struct sir_dev *dev)
{
struct qos_info *qos = &dev->qos;
@@ -243,10 +233,9 @@ static int girbil_reset(struct sir_dev *dev)
return (delay > 0) ? delay : ret;
}
+module_sirdev_driver(girbil);
+
MODULE_AUTHOR("Dag Brattli <dagb@...uit.no>");
MODULE_DESCRIPTION("Greenwich GIrBIL dongle driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("irda-dongle-4"); /* IRDA_GIRBIL_DONGLE */
-
-module_init(girbil_sir_init);
-module_exit(girbil_sir_cleanup);
--
2.8.1
Powered by blists - more mailing lists