summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/siemens_mpi.c
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2012-02-23 20:57:25 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-02-24 21:39:20 +0100
commitd860322f34e4a53f347b1aeae23d5b72f1e91b8c (patch)
treebea8d4ab22b81eed98ab67c82a994b73cb6c5763 /drivers/usb/serial/siemens_mpi.c
parentusb-serial: use new registration API in [n-p]* drivers (diff)
downloadlinux-d860322f34e4a53f347b1aeae23d5b72f1e91b8c.tar.xz
linux-d860322f34e4a53f347b1aeae23d5b72f1e91b8c.zip
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.c26
1 files changed, 11 insertions, 15 deletions
diff --git a/drivers/usb/serial/siemens_mpi.c b/drivers/usb/serial/siemens_mpi.c
index 74cd4ccdb3fc..8aa4c1aef6d1 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);