]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/misc/usbtest.c
USB: use DIV_ROUND_UP
[linux-2.6-omap-h63xx.git] / drivers / usb / misc / usbtest.c
index b6b5b2affad1deac8d670adea8f050593b6e8bc0..17100471e461fcf1637a6eaeda531f19eb011974 100644 (file)
@@ -1404,7 +1404,7 @@ static struct urb *iso_alloc_urb (
                return NULL;
        maxp = 0x7ff & le16_to_cpu(desc->wMaxPacketSize);
        maxp *= 1 + (0x3 & (le16_to_cpu(desc->wMaxPacketSize) >> 11));
-       packets = (bytes + maxp - 1) / maxp;
+       packets = DIV_ROUND_UP(bytes, maxp);
 
        urb = usb_alloc_urb (packets, GFP_KERNEL);
        if (!urb)