> > + * endpoint, with a multiplex header. The second bulk in is > > + * used for events. Throw away all but the first two bulk in > > + * urbs. > > + */ > > + for (i = 2; i < serial->num_bulk_in; ++i) { > > + port = serial->port[i]; > > + for (j = 0; j < ARRAY_SIZE(port->read_urbs); ++j) { > > + usb_free_urb(port->read_urbs[j]); > > + kfree(port->bulk_in_buffers[j]); > > + port->read_urbs[j] = NULL; > > + port->bulk_in_buffers[j] = NULL; > > + port->bulk_in_size = 0; > > + } > > + } > > Is this really necessary? Why not simple leave these urbs and buffers > allocated (if there are any devices with more than to bulk-in > endpoints at all)? You never submit them (and neither does usb-serial > core since you override resume) so could be left allocated. Hi Johan It is not really necessary. The hardware i have has 4 bulk-in endpoints, of which the driver only uses the first two. I've no idea what the other two are used for. Freeing the buffers does save a little bit of memory, but i could drop this code block and skip the memory saved? Andrew -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html