Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 235353
b: refs/heads/master
c: 969e303
h: refs/heads/master
i:
  235351: f2f74aa
v: v3
  • Loading branch information
Alan Stern authored and Greg Kroah-Hartman committed Feb 25, 2011
1 parent 21d10cd commit dfeb8be
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 22ced6874fc47bb051e7460443e454ca8efc457e
refs/heads/master: 969e3033ae7733a0af8f7742ca74cd16c0857e71
5 changes: 2 additions & 3 deletions trunk/drivers/usb/serial/usb-serial.c
Original file line number Diff line number Diff line change
Expand Up @@ -911,9 +911,8 @@ int usb_serial_probe(struct usb_interface *interface,
dev_err(&interface->dev, "No free urbs available\n");
goto probe_error;
}
buffer_size = serial->type->bulk_in_size;
if (!buffer_size)
buffer_size = le16_to_cpu(endpoint->wMaxPacketSize);
buffer_size = max_t(int, serial->type->bulk_in_size,
le16_to_cpu(endpoint->wMaxPacketSize));
port->bulk_in_size = buffer_size;
port->bulk_in_endpointAddress = endpoint->bEndpointAddress;
port->bulk_in_buffer = kmalloc(buffer_size, GFP_KERNEL);
Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/usb/serial.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,8 @@ static inline void usb_set_serial_data(struct usb_serial *serial, void *data)
* @id_table: pointer to a list of usb_device_id structures that define all
* of the devices this structure can support.
* @num_ports: the number of different ports this device will have.
* @bulk_in_size: bytes to allocate for bulk-in buffer (0 = end-point size)
* @bulk_in_size: minimum number of bytes to allocate for bulk-in buffer
* (0 = end-point size)
* @bulk_out_size: bytes to allocate for bulk-out buffer (0 = end-point size)
* @calc_num_ports: pointer to a function to determine how many ports this
* device has dynamically. It will be called after the probe()
Expand Down

0 comments on commit dfeb8be

Please sign in to comment.