diff options
Diffstat (limited to 'drivers/net/irda')
-rw-r--r-- | drivers/net/irda/irda-usb.c | 35 | ||||
-rw-r--r-- | drivers/net/irda/kingsun-sir.c | 19 | ||||
-rw-r--r-- | drivers/net/irda/ks959-sir.c | 21 | ||||
-rw-r--r-- | drivers/net/irda/ksdazzle-sir.c | 21 | ||||
-rw-r--r-- | drivers/net/irda/mcs7780.c | 23 | ||||
-rw-r--r-- | drivers/net/irda/stir4200.c | 19 |
6 files changed, 6 insertions, 132 deletions
diff --git a/drivers/net/irda/irda-usb.c b/drivers/net/irda/irda-usb.c index d9267cb98a2..72f687b40d6 100644 --- a/drivers/net/irda/irda-usb.c +++ b/drivers/net/irda/irda-usb.c @@ -1914,41 +1914,8 @@ static struct usb_driver irda_driver = { #endif }; -/************************* MODULE CALLBACKS *************************/ -/* - * Deal with module insertion/removal - * Mostly tell USB about our existence - */ - -/*------------------------------------------------------------------*/ -/* - * Module insertion - */ -static int __init usb_irda_init(void) -{ - int ret; - - ret = usb_register(&irda_driver); - if (ret < 0) - return ret; - - IRDA_MESSAGE("USB IrDA support registered\n"); - return 0; -} -module_init(usb_irda_init); +module_usb_driver(irda_driver); -/*------------------------------------------------------------------*/ -/* - * Module removal - */ -static void __exit usb_irda_cleanup(void) -{ - /* Deregister the driver and remove all pending instances */ - usb_deregister(&irda_driver); -} -module_exit(usb_irda_cleanup); - -/*------------------------------------------------------------------*/ /* * Module parameters */ diff --git a/drivers/net/irda/kingsun-sir.c b/drivers/net/irda/kingsun-sir.c index cb90d640007..79aebeee928 100644 --- a/drivers/net/irda/kingsun-sir.c +++ b/drivers/net/irda/kingsun-sir.c @@ -621,24 +621,7 @@ static struct usb_driver irda_driver = { #endif }; -/* - * Module insertion - */ -static int __init kingsun_init(void) -{ - return usb_register(&irda_driver); -} -module_init(kingsun_init); - -/* - * Module removal - */ -static void __exit kingsun_cleanup(void) -{ - /* Deregister the driver and remove all pending instances */ - usb_deregister(&irda_driver); -} -module_exit(kingsun_cleanup); +module_usb_driver(irda_driver); MODULE_AUTHOR("Alex Villacís Lasso <a_villacis@palosanto.com>"); MODULE_DESCRIPTION("IrDA-USB Dongle Driver for KingSun/DonShine"); diff --git a/drivers/net/irda/ks959-sir.c b/drivers/net/irda/ks959-sir.c index 1046014dd6c..abe689dffc7 100644 --- a/drivers/net/irda/ks959-sir.c +++ b/drivers/net/irda/ks959-sir.c @@ -901,26 +901,7 @@ static struct usb_driver irda_driver = { #endif }; -/* - * Module insertion - */ -static int __init ks959_init(void) -{ - return usb_register(&irda_driver); -} - -module_init(ks959_init); - -/* - * Module removal - */ -static void __exit ks959_cleanup(void) -{ - /* Deregister the driver and remove all pending instances */ - usb_deregister(&irda_driver); -} - -module_exit(ks959_cleanup); +module_usb_driver(irda_driver); MODULE_AUTHOR("Alex Villacís Lasso <a_villacis@palosanto.com>"); MODULE_DESCRIPTION("IrDA-USB Dongle Driver for KingSun KS-959"); diff --git a/drivers/net/irda/ksdazzle-sir.c b/drivers/net/irda/ksdazzle-sir.c index 9cc142fcc71..f8c01088eeb 100644 --- a/drivers/net/irda/ksdazzle-sir.c +++ b/drivers/net/irda/ksdazzle-sir.c @@ -796,26 +796,7 @@ static struct usb_driver irda_driver = { #endif }; -/* - * Module insertion - */ -static int __init ksdazzle_init(void) -{ - return usb_register(&irda_driver); -} - -module_init(ksdazzle_init); - -/* - * Module removal - */ -static void __exit ksdazzle_cleanup(void) -{ - /* Deregister the driver and remove all pending instances */ - usb_deregister(&irda_driver); -} - -module_exit(ksdazzle_cleanup); +module_usb_driver(irda_driver); MODULE_AUTHOR("Alex Villacís Lasso <a_villacis@palosanto.com>"); MODULE_DESCRIPTION("IrDA-USB Dongle Driver for KingSun Dazzle"); diff --git a/drivers/net/irda/mcs7780.c b/drivers/net/irda/mcs7780.c index be52bfed66a..1a00b5990cb 100644 --- a/drivers/net/irda/mcs7780.c +++ b/drivers/net/irda/mcs7780.c @@ -968,25 +968,4 @@ static void mcs_disconnect(struct usb_interface *intf) IRDA_DEBUG(0, "MCS7780 now disconnected.\n"); } -/* Module insertion */ -static int __init mcs_init(void) -{ - int result; - - /* register this driver with the USB subsystem */ - result = usb_register(&mcs_driver); - if (result) - IRDA_ERROR("usb_register failed. Error number %d\n", result); - - return result; -} -module_init(mcs_init); - -/* Module removal */ -static void __exit mcs_exit(void) -{ - /* deregister this driver with the USB subsystem */ - usb_deregister(&mcs_driver); -} -module_exit(mcs_exit); - +module_usb_driver(mcs_driver); diff --git a/drivers/net/irda/stir4200.c b/drivers/net/irda/stir4200.c index 41c96b3d815..212868eb6f5 100644 --- a/drivers/net/irda/stir4200.c +++ b/drivers/net/irda/stir4200.c @@ -1133,21 +1133,4 @@ static struct usb_driver irda_driver = { #endif }; -/* - * Module insertion - */ -static int __init stir_init(void) -{ - return usb_register(&irda_driver); -} -module_init(stir_init); - -/* - * Module removal - */ -static void __exit stir_cleanup(void) -{ - /* Deregister the driver and remove all pending instances */ - usb_deregister(&irda_driver); -} -module_exit(stir_cleanup); +module_usb_driver(irda_driver); |