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

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


Avoid using generic init/exit functions.

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

diff --git a/drivers/net/irda/esi-sir.c b/drivers/net/irda/esi-sir.c
index 019a3e8..65470e4 100644
--- a/drivers/net/irda/esi-sir.c
+++ b/drivers/net/irda/esi-sir.c
@@ -52,16 +52,6 @@ static struct dongle_driver esi = {
.set_speed = esi_change_speed,
};

-static int __init esi_sir_init(void)
-{
- return irda_register_dongle(&esi);
-}
-
-static void __exit esi_sir_cleanup(void)
-{
- irda_unregister_dongle(&esi);
-}
-
static int esi_open(struct sir_dev *dev)
{
struct qos_info *qos = &dev->qos;
@@ -147,11 +137,9 @@ static int esi_reset(struct sir_dev *dev)
return 0;
}

+module_sirdev_driver(esi);
+
MODULE_AUTHOR("Dag Brattli <dagb@xxxxxxxxx>");
MODULE_DESCRIPTION("Extended Systems JetEye PC dongle driver");
MODULE_LICENSE("GPL");
MODULE_ALIAS("irda-dongle-1"); /* IRDA_ESI_DONGLE */
-
-module_init(esi_sir_init);
-module_exit(esi_sir_cleanup);
-
--
2.8.1