diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-13 23:50:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-08-13 23:50:10 -0400 |
commit | b635acec48bcaa9183fcbf4e3955616b0d4119b5 (patch) | |
tree | 55bf04579019674736355927743bbb4a8913d5d5 /drivers/usb/serial/usb-serial.c | |
parent | 9921b256bb7402143a5bf0b722582562b6485eb8 (diff) | |
parent | ca6d1b1333bc2e61e37982de1f28d8604c232414 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (47 commits)
usb: musb: pass configuration specifics via pdata
usb: musb: fix hanging when rmmod gadget driver
USB: Add MUSB and TUSB support
USB: serial: remove CONFIG_USB_DEBUG from sierra and option drivers
USB: Add vendor/product id of ZTE MF628 to option
USB: quirk PLL power down mode
USB: omap_udc: fix compilation with debug enabled
usb: cdc-acm: drain writes on close
usb: cdc-acm: stop dropping tx buffers
usb: cdc-acm: bugfix release()
usb gadget: issue notifications from ACM function
usb gadget: remove needless struct members
USB: sh: r8a66597-hcd: fix disconnect regression
USB: isp1301: fix compilation
USB: fix compiler warning fix
usb-storage: unusual_devs entry for Nokia 5300
USB: cdc-acm.c: Fix compile warnings
USB: BandRich BandLuxe C150/C250 HSPA Data Card Driver
USB: ftdi_sio: add support for PHI Fisco data cable (FT232BM based, VID/PID 0403:e40b)
usb: isp1760: don't be noisy about short packets.
...
Diffstat (limited to 'drivers/usb/serial/usb-serial.c')
-rw-r--r-- | drivers/usb/serial/usb-serial.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index 8c2d531eedea..b157c48e8b78 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c | |||
@@ -122,9 +122,6 @@ static void return_serial(struct usb_serial *serial) | |||
122 | 122 | ||
123 | dbg("%s", __func__); | 123 | dbg("%s", __func__); |
124 | 124 | ||
125 | if (serial == NULL) | ||
126 | return; | ||
127 | |||
128 | for (i = 0; i < serial->num_ports; ++i) | 125 | for (i = 0; i < serial->num_ports; ++i) |
129 | serial_table[serial->minor + i] = NULL; | 126 | serial_table[serial->minor + i] = NULL; |
130 | } | 127 | } |
@@ -142,7 +139,8 @@ static void destroy_serial(struct kref *kref) | |||
142 | serial->type->shutdown(serial); | 139 | serial->type->shutdown(serial); |
143 | 140 | ||
144 | /* return the minor range that this device had */ | 141 | /* return the minor range that this device had */ |
145 | return_serial(serial); | 142 | if (serial->minor != SERIAL_TTY_NO_MINOR) |
143 | return_serial(serial); | ||
146 | 144 | ||
147 | for (i = 0; i < serial->num_ports; ++i) | 145 | for (i = 0; i < serial->num_ports; ++i) |
148 | serial->port[i]->port.count = 0; | 146 | serial->port[i]->port.count = 0; |
@@ -575,6 +573,7 @@ static struct usb_serial *create_serial(struct usb_device *dev, | |||
575 | serial->interface = interface; | 573 | serial->interface = interface; |
576 | kref_init(&serial->kref); | 574 | kref_init(&serial->kref); |
577 | mutex_init(&serial->disc_mutex); | 575 | mutex_init(&serial->disc_mutex); |
576 | serial->minor = SERIAL_TTY_NO_MINOR; | ||
578 | 577 | ||
579 | return serial; | 578 | return serial; |
580 | } | 579 | } |