[PATCH 6/8 net-next] irda: old_belkin-sir: use module_sirdev_driver() helper

From: Fabian Frederick
Date: Wed Jul 13 2016 - 14:30:47 EST


Avoid using generic init/exit functions.

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

diff --git a/drivers/net/irda/old_belkin-sir.c b/drivers/net/irda/old_belkin-sir.c
index a7c2e99..b15157c 100644
--- a/drivers/net/irda/old_belkin-sir.c
+++ b/drivers/net/irda/old_belkin-sir.c
@@ -76,16 +76,6 @@ static struct dongle_driver old_belkin = {
.set_speed = old_belkin_change_speed,
};

-static int __init old_belkin_sir_init(void)
-{
- return irda_register_dongle(&old_belkin);
-}
-
-static void __exit old_belkin_sir_cleanup(void)
-{
- irda_unregister_dongle(&old_belkin);
-}
-
static int old_belkin_open(struct sir_dev *dev)
{
struct qos_info *qos = &dev->qos;
@@ -137,10 +127,9 @@ static int old_belkin_reset(struct sir_dev *dev)
return 0;
}

+module_sirdev_driver(old_belkin);
+
MODULE_AUTHOR("Jean Tourrilhes <jt@xxxxxxxxxx>");
MODULE_DESCRIPTION("Belkin (old) SmartBeam dongle driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("irda-dongle-7"); /* IRDA_OLD_BELKIN_DONGLE */
-
-module_init(old_belkin_sir_init);
-module_exit(old_belkin_sir_cleanup);
--
2.8.1