@@ -542,9 +542,9 @@ static void usbredir_handle_iso_data(USBRedirDevice *dev, USBPacket *p,
start_iso.pkts_per_urb = 32;
}
- start_iso.no_urbs = (dev->endpoint[EP2I(ep)].bufpq_target_size +
- start_iso.pkts_per_urb - 1) /
- start_iso.pkts_per_urb;
+ start_iso.no_urbs = DIV_ROUND_UP(
+ dev->endpoint[EP2I(ep)].bufpq_target_size,
+ start_iso.pkts_per_urb);
/* Output endpoints pre-fill only 1/2 of the packets, keeping the rest
as overflow buffer. Also see the usbredir protocol documentation */
if (!(ep & USB_DIR_IN)) {