aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-28 16:12:31 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-28 16:12:31 -0500
commitc9d521747872ecb77ba39bb9a8162449cd74d343 (patch)
tree530cf52fb49fcb3ca2f25bab2af96130737f123a /drivers
parentb4264af2c59e287153e99c7b4e7516086366d272 (diff)
USB: serial: sierra.c: use module_usb_serial_driver
This converts the sierra.c driver to use the module_usb_serial_driver() call instead of having to have a module_init/module_exit function, saving a lot of duplicated code. CC: Alan Stern <stern@rowland.harvard.edu> CC: Rusty Russell <rusty@rustcorp.com.au> CC: Johan Hovold <jhovold@gmail.com> CC: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/usb/serial/sierra.c20
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/usb/serial/sierra.c b/drivers/usb/serial/sierra.c
index d75a75b83e9f..f14465a83dd1 100644
--- a/drivers/usb/serial/sierra.c
+++ b/drivers/usb/serial/sierra.c
@@ -1115,25 +1115,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
1115 &sierra_device, NULL 1115 &sierra_device, NULL
1116}; 1116};
1117 1117
1118/* Functions used by new usb-serial code. */ 1118module_usb_serial_driver(sierra_driver, serial_drivers);
1119static int __init sierra_init(void)
1120{
1121 int retval;
1122
1123 retval = usb_serial_register_drivers(&sierra_driver, serial_drivers);
1124 if (retval == 0)
1125 printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
1126 DRIVER_DESC "\n");
1127 return retval;
1128}
1129
1130static void __exit sierra_exit(void)
1131{
1132 usb_serial_deregister_drivers(&sierra_driver, serial_drivers);
1133}
1134
1135module_init(sierra_init);
1136module_exit(sierra_exit);
1137 1119
1138MODULE_AUTHOR(DRIVER_AUTHOR); 1120MODULE_AUTHOR(DRIVER_AUTHOR);
1139MODULE_DESCRIPTION(DRIVER_DESC); 1121MODULE_DESCRIPTION(DRIVER_DESC);