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

From: Fabian Frederick
Date: Wed Jul 13 2016 - 14:31:37 EST


Avoid using generic init/exit functions.

Signed-off-by: Fabian Frederick <fabf@xxxxxxxxx>
---
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@xxxxxxxxx>");
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