diff options
Diffstat (limited to 'drivers/usb/serial/funsoft.c')
-rw-r--r-- | drivers/usb/serial/funsoft.c | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/drivers/usb/serial/funsoft.c b/drivers/usb/serial/funsoft.c index 5d4b099dcf8b..bb274a244ae9 100644 --- a/drivers/usb/serial/funsoft.c +++ b/drivers/usb/serial/funsoft.c | |||
@@ -29,7 +29,6 @@ static struct usb_driver funsoft_driver = { | |||
29 | .probe = usb_serial_probe, | 29 | .probe = usb_serial_probe, |
30 | .disconnect = usb_serial_disconnect, | 30 | .disconnect = usb_serial_disconnect, |
31 | .id_table = id_table, | 31 | .id_table = id_table, |
32 | .no_dynamic_id = 1, | ||
33 | }; | 32 | }; |
34 | 33 | ||
35 | static struct usb_serial_driver funsoft_device = { | 34 | static struct usb_serial_driver funsoft_device = { |
@@ -38,27 +37,21 @@ static struct usb_serial_driver funsoft_device = { | |||
38 | .name = "funsoft", | 37 | .name = "funsoft", |
39 | }, | 38 | }, |
40 | .id_table = id_table, | 39 | .id_table = id_table, |
41 | .usb_driver = &funsoft_driver, | ||
42 | .num_ports = 1, | 40 | .num_ports = 1, |
43 | }; | 41 | }; |
44 | 42 | ||
43 | static struct usb_serial_driver * const serial_drivers[] = { | ||
44 | &funsoft_device, NULL | ||
45 | }; | ||
46 | |||
45 | static int __init funsoft_init(void) | 47 | static int __init funsoft_init(void) |
46 | { | 48 | { |
47 | int retval; | 49 | return usb_serial_register_drivers(&funsoft_driver, serial_drivers); |
48 | |||
49 | retval = usb_serial_register(&funsoft_device); | ||
50 | if (retval) | ||
51 | return retval; | ||
52 | retval = usb_register(&funsoft_driver); | ||
53 | if (retval) | ||
54 | usb_serial_deregister(&funsoft_device); | ||
55 | return retval; | ||
56 | } | 50 | } |
57 | 51 | ||
58 | static void __exit funsoft_exit(void) | 52 | static void __exit funsoft_exit(void) |
59 | { | 53 | { |
60 | usb_deregister(&funsoft_driver); | 54 | usb_serial_deregister_drivers(&funsoft_driver, serial_drivers); |
61 | usb_serial_deregister(&funsoft_device); | ||
62 | } | 55 | } |
63 | 56 | ||
64 | module_init(funsoft_init); | 57 | module_init(funsoft_init); |