summaryrefslogtreecommitdiff
path: root/drivers/usb/serial/spcp8x5.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/serial/spcp8x5.c')
-rw-r--r--drivers/usb/serial/spcp8x5.c26
1 files changed, 10 insertions, 16 deletions
diff --git a/drivers/usb/serial/spcp8x5.c b/drivers/usb/serial/spcp8x5.c
index d7f5eee18f00..af898937d4b1 100644
--- a/drivers/usb/serial/spcp8x5.c
+++ b/drivers/usb/serial/spcp8x5.c
@@ -156,7 +156,6 @@ static struct usb_driver spcp8x5_driver = {
.probe = usb_serial_probe,
.disconnect = usb_serial_disconnect,
.id_table = id_table,
- .no_dynamic_id = 1,
};
@@ -649,7 +648,6 @@ static struct usb_serial_driver spcp8x5_device = {
.name = "SPCP8x5",
},
.id_table = id_table,
- .usb_driver = &spcp8x5_driver,
.num_ports = 1,
.open = spcp8x5_open,
.dtr_rts = spcp8x5_dtr_rts,
@@ -664,28 +662,24 @@ static struct usb_serial_driver spcp8x5_device = {
.process_read_urb = spcp8x5_process_read_urb,
};
+static struct usb_serial_driver * const serial_drivers[] = {
+ &spcp8x5_device, NULL
+};
+
static int __init spcp8x5_init(void)
{
int retval;
- retval = usb_serial_register(&spcp8x5_device);
- if (retval)
- goto failed_usb_serial_register;
- retval = usb_register(&spcp8x5_driver);
- if (retval)
- goto failed_usb_register;
- printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
- DRIVER_DESC "\n");
- return 0;
-failed_usb_register:
- usb_serial_deregister(&spcp8x5_device);
-failed_usb_serial_register:
+
+ retval = usb_serial_register_drivers(&spcp8x5_driver, serial_drivers);
+ if (retval == 0)
+ printk(KERN_INFO KBUILD_MODNAME ": " DRIVER_VERSION ":"
+ DRIVER_DESC "\n");
return retval;
}
static void __exit spcp8x5_exit(void)
{
- usb_deregister(&spcp8x5_driver);
- usb_serial_deregister(&spcp8x5_device);
+ usb_serial_deregister_drivers(&spcp8x5_driver, serial_drivers);
}
module_init(spcp8x5_init);