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

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


Avoid using generic init/exit functions.

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

diff --git a/drivers/net/irda/act200l-sir.c b/drivers/net/irda/act200l-sir.c
index e891751..bb58c6e 100644
--- a/drivers/net/irda/act200l-sir.c
+++ b/drivers/net/irda/act200l-sir.c
@@ -93,16 +93,6 @@ static struct dongle_driver act200l = {
.set_speed = act200l_change_speed,
};

-static int __init act200l_sir_init(void)
-{
- return irda_register_dongle(&act200l);
-}
-
-static void __exit act200l_sir_cleanup(void)
-{
- irda_unregister_dongle(&act200l);
-}
-
static int act200l_open(struct sir_dev *dev)
{
struct qos_info *qos = &dev->qos;
@@ -241,10 +231,9 @@ static int act200l_reset(struct sir_dev *dev)
return (delay > 0) ? delay : ret;
}

+module_sirdev_driver(act200l);
+
MODULE_AUTHOR("SHIMIZU Takuya <tshimizu@xxxxxxxxxxxxxxxx>");
MODULE_DESCRIPTION("ACTiSYS ACT-IR200L dongle driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("irda-dongle-10"); /* IRDA_ACT200L_DONGLE */
-
-module_init(act200l_sir_init);
-module_exit(act200l_sir_cleanup);
--
2.8.1