diff options
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index a19ed74d770d..5d9b178484fd 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -151,6 +151,7 @@ static void destroy_serial(struct kref *kref) | |||
151 | } | 151 | } |
152 | } | 152 | } |
153 | 153 | ||
154 | usb_put_intf(serial->interface); | ||
154 | usb_put_dev(serial->dev); | 155 | usb_put_dev(serial->dev); |
155 | kfree(serial); | 156 | kfree(serial); |
156 | } | 157 | } |
@@ -620,7 +621,7 @@ static struct usb_serial *create_serial(struct usb_device *dev, | |||
620 | } | 621 | } |
621 | serial->dev = usb_get_dev(dev); | 622 | serial->dev = usb_get_dev(dev); |
622 | serial->type = driver; | 623 | serial->type = driver; |
623 | serial->interface = interface; | 624 | serial->interface = usb_get_intf(interface); |
624 | kref_init(&serial->kref); | 625 | kref_init(&serial->kref); |
625 | mutex_init(&serial->disc_mutex); | 626 | mutex_init(&serial->disc_mutex); |
626 | serial->minor = SERIAL_TTY_NO_MINOR; | 627 | serial->minor = SERIAL_TTY_NO_MINOR; |
@@ -902,6 +903,7 @@ static int usb_serial_probe(struct usb_interface *interface, | |||
902 | port->port.ops = &serial_port_ops; | 903 | port->port.ops = &serial_port_ops; |
903 | port->serial = serial; | 904 | port->serial = serial; |
904 | spin_lock_init(&port->lock); | 905 | spin_lock_init(&port->lock); |
906 | init_waitqueue_head(&port->delta_msr_wait); | ||
905 | /* Keep this for private driver use for the moment but | 907 | /* Keep this for private driver use for the moment but |
906 | should probably go away */ | 908 | should probably go away */ |
907 | INIT_WORK(&port->work, usb_serial_port_work); | 909 | INIT_WORK(&port->work, usb_serial_port_work); |