Skip to content

Commit

Permalink
USB: serial: oti6858.c: use module_usb_serial_driver
Browse files Browse the repository at this point in the history
This converts the oti6858.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: Johan Hovold <jhovold@gmail.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Greg Kroah-Hartman committed Feb 28, 2012
1 parent 9334c4c commit db55a04
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions drivers/usb/serial/oti6858.c
Original file line number Diff line number Diff line change
Expand Up @@ -958,20 +958,7 @@ static void oti6858_write_bulk_callback(struct urb *urb)
}
}

/* module description and (de)initialization */

static int __init oti6858_init(void)
{
return usb_serial_register_drivers(&oti6858_driver, serial_drivers);
}

static void __exit oti6858_exit(void)
{
usb_serial_deregister_drivers(&oti6858_driver, serial_drivers);
}

module_init(oti6858_init);
module_exit(oti6858_exit);
module_usb_serial_driver(oti6858_driver, serial_drivers);

MODULE_DESCRIPTION(OTI6858_DESCRIPTION);
MODULE_AUTHOR(OTI6858_AUTHOR);
Expand Down

0 comments on commit db55a04

Please sign in to comment.