diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-28 16:12:29 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-28 16:12:29 -0500 |
commit | b4264af2c59e287153e99c7b4e7516086366d272 (patch) | |
tree | 69c9a6f2ca3ea7218f63e5db3be6547622b2918c /drivers/usb/serial/siemens_mpi.c | |
parent | 3d8d7296f7dbc7c977b8552dcfa649817d91d24c (diff) |
USB: serial: siemens_mpi.c: use module_usb_serial_driver
This converts the siemens_mpi.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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/serial/siemens_mpi.c')
-rw-r--r-- | drivers/usb/serial/siemens_mpi.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/drivers/usb/serial/siemens_mpi.c b/drivers/usb/serial/siemens_mpi.c index 8aa4c1aef6d1..46c0430fd38b 100644 --- a/drivers/usb/serial/siemens_mpi.c +++ b/drivers/usb/serial/siemens_mpi.c | |||
@@ -49,26 +49,8 @@ static struct usb_serial_driver * const serial_drivers[] = { | |||
49 | &siemens_usb_mpi_device, NULL | 49 | &siemens_usb_mpi_device, NULL |
50 | }; | 50 | }; |
51 | 51 | ||
52 | static int __init siemens_usb_mpi_init(void) | 52 | module_usb_serial_driver(siemens_usb_mpi_driver, serial_drivers); |
53 | { | ||
54 | int retval; | ||
55 | 53 | ||
56 | retval = usb_serial_register_drivers(&siemens_usb_mpi_driver, | ||
57 | serial_drivers); | ||
58 | if (retval == 0) { | ||
59 | printk(KERN_INFO DRIVER_DESC "\n"); | ||
60 | printk(KERN_INFO DRIVER_VERSION " " DRIVER_AUTHOR "\n"); | ||
61 | } | ||
62 | return retval; | ||
63 | } | ||
64 | |||
65 | static void __exit siemens_usb_mpi_exit(void) | ||
66 | { | ||
67 | usb_serial_deregister_drivers(&siemens_usb_mpi_driver, serial_drivers); | ||
68 | } | ||
69 | |||
70 | module_init(siemens_usb_mpi_init); | ||
71 | module_exit(siemens_usb_mpi_exit); | ||
72 | MODULE_AUTHOR(DRIVER_AUTHOR); | 54 | MODULE_AUTHOR(DRIVER_AUTHOR); |
73 | MODULE_DESCRIPTION(DRIVER_DESC); | 55 | MODULE_DESCRIPTION(DRIVER_DESC); |
74 | MODULE_LICENSE("GPL"); | 56 | MODULE_LICENSE("GPL"); |