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 2df84845bafb..650be17a68f2 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 | } |
@@ -612,7 +613,7 @@ static struct usb_serial *create_serial(struct usb_device *dev, | |||
612 | } | 613 | } |
613 | serial->dev = usb_get_dev(dev); | 614 | serial->dev = usb_get_dev(dev); |
614 | serial->type = driver; | 615 | serial->type = driver; |
615 | serial->interface = interface; | 616 | serial->interface = usb_get_intf(interface); |
616 | kref_init(&serial->kref); | 617 | kref_init(&serial->kref); |
617 | mutex_init(&serial->disc_mutex); | 618 | mutex_init(&serial->disc_mutex); |
618 | serial->minor = SERIAL_TTY_NO_MINOR; | 619 | serial->minor = SERIAL_TTY_NO_MINOR; |
@@ -894,6 +895,7 @@ static int usb_serial_probe(struct usb_interface *interface, | |||
894 | port->port.ops = &serial_port_ops; | 895 | port->port.ops = &serial_port_ops; |
895 | port->serial = serial; | 896 | port->serial = serial; |
896 | spin_lock_init(&port->lock); | 897 | spin_lock_init(&port->lock); |
898 | init_waitqueue_head(&port->delta_msr_wait); | ||
897 | /* Keep this for private driver use for the moment but | 899 | /* Keep this for private driver use for the moment but |
898 | should probably go away */ | 900 | should probably go away */ |
899 | INIT_WORK(&port->work, usb_serial_port_work); | 901 | INIT_WORK(&port->work, usb_serial_port_work); |