diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-09-05 12:56:57 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-05 12:56:57 -0400 |
| commit | 616ad8c44281c0c6711a72b560e01ec335ff27e0 (patch) | |
| tree | 0a20453ffedb09db6fb41a0c2208ccc2c7751d3a /drivers/usb/serial/usb-serial.c | |
| parent | 99809963c99e1ed868d9ebeb4a5e7ee1cbe0309f (diff) | |
| parent | b380b0d4f7dffcc235c0facefa537d4655619101 (diff) | |
Merge branch 'linus' into x86/defconfig
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 | } |
