USB: further fix for usb-serial

this is a fix for the outstanding usb-serial issues.

Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by Oliver Neukum and committed by Greg Kroah-Hartman a1f721c8 c744f99e

+4 -5
+4 -5
drivers/usb/serial/usb-serial.c
··· 99 99 continue; 100 100 101 101 *minor = i; 102 + j = 0; 102 103 dbg("%s - minor base = %d", __FUNCTION__, *minor); 103 - for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) 104 + for (i = *minor; (i < (*minor + num_ports)) && (i < SERIAL_TTY_MINORS); ++i) { 104 105 serial_table[i] = serial; 106 + serial->port[j++]->number = i; 107 + } 105 108 spin_unlock(&table_lock); 106 109 return serial; 107 110 } ··· 850 847 port = kzalloc(sizeof(struct usb_serial_port), GFP_KERNEL); 851 848 if (!port) 852 849 goto probe_error; 853 - port->number = i + serial->minor; 854 850 port->serial = serial; 855 851 spin_lock_init(&port->lock); 856 852 mutex_init(&port->mutex); ··· 1036 1034 usb_free_urb(port->interrupt_out_urb); 1037 1035 kfree(port->interrupt_out_buffer); 1038 1036 } 1039 - 1040 - /* return the minor range that this device had */ 1041 - return_serial (serial); 1042 1037 1043 1038 /* free up any memory that we allocated */ 1044 1039 for (i = 0; i < serial->num_port_pointers; ++i)