summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/siemens_mpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/siemens_mpi.c')
-rw-r--r--drivers/usb/serial/siemens_mpi.c30
1 files changed, 4 insertions, 26 deletions
diff --git a/drivers/usb/serial/siemens_mpi.c b/drivers/usb/serial/siemens_mpi.c
index 74cd4ccdb3fc..46c0430fd38b 100644
--- a/drivers/usb/serial/siemens_mpi.c
+++ b/drivers/usb/serial/siemens_mpi.c
@@ -42,37 +42,15 @@ static struct usb_serial_driver siemens_usb_mpi_device = {
.name = "siemens_mpi",
},
.id_table = id_table,
- .usb_driver = &siemens_usb_mpi_driver,
.num_ports = 1,
};
-static int __init siemens_usb_mpi_init(void)
-{
- int retval;
-
- retval = usb_serial_register(&siemens_usb_mpi_device);
- if (retval)
- goto failed_usb_serial_register;
- retval = usb_register(&siemens_usb_mpi_driver);
- if (retval)
- goto failed_usb_register;
- printk(KERN_INFO DRIVER_DESC "\n");
- printk(KERN_INFO DRIVER_VERSION " " DRIVER_AUTHOR "\n");
- return retval;
-failed_usb_register:
- usb_serial_deregister(&siemens_usb_mpi_device);
-failed_usb_serial_register:
- return retval;
-}
+static struct usb_serial_driver * const serial_drivers[] = {
+ &siemens_usb_mpi_device, NULL
+};
-static void __exit siemens_usb_mpi_exit(void)
-{
- usb_deregister(&siemens_usb_mpi_driver);
- usb_serial_deregister(&siemens_usb_mpi_device);
-}
+module_usb_serial_driver(siemens_usb_mpi_driver, serial_drivers);
-module_init(siemens_usb_mpi_init);
-module_exit(siemens_usb_mpi_exit);
MODULE_AUTHOR(DRIVER_AUTHOR);
MODULE_DESCRIPTION(DRIVER_DESC);
MODULE_LICENSE("GPL");