diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-02-23 14:57:25 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-24 12:39:20 -0800 |
commit | d860322f34e4a53f347b1aeae23d5b72f1e91b8c (patch) | |
tree | bea8d4ab22b81eed98ab67c82a994b73cb6c5763 /drivers/usb/serial/siemens_mpi.c | |
parent | f667ddad41e303ebc2c6d5bf3105dffe2fbdd717 (diff) |
usb-serial: use new registration API in [q-s]* drivers
This patch (as1528) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:
qcaux, qcserial, safe_serial, siemens_mpi, sierra,
spcp8x5, ssu100, and symbolserial.
Signed-off-by: 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 | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/usb/serial/siemens_mpi.c b/drivers/usb/serial/siemens_mpi.c index 74cd4ccdb3f..8aa4c1aef6d 100644 --- a/drivers/usb/serial/siemens_mpi.c +++ b/drivers/usb/serial/siemens_mpi.c @@ -42,33 +42,29 @@ 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 struct usb_serial_driver * const serial_drivers[] = { + &siemens_usb_mpi_device, NULL +}; + 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: + retval = usb_serial_register_drivers(&siemens_usb_mpi_driver, + serial_drivers); + if (retval == 0) { + printk(KERN_INFO DRIVER_DESC "\n"); + printk(KERN_INFO DRIVER_VERSION " " DRIVER_AUTHOR "\n"); + } return retval; } static void __exit siemens_usb_mpi_exit(void) { - usb_deregister(&siemens_usb_mpi_driver); - usb_serial_deregister(&siemens_usb_mpi_device); + usb_serial_deregister_drivers(&siemens_usb_mpi_driver, serial_drivers); } module_init(siemens_usb_mpi_init); |