From 96555d383362c30d444593333d60a4588416db62 Mon Sep 17 00:00:00 2001 From: pfg Date: Tue, 26 Apr 2016 15:03:15 +0000 Subject: sys/dev: extend use of the howmany() macro when available. We have a howmany() macro in the header that is convenient to re-use as it makes things easier to read. --- sys/dev/usb/controller/ohci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/dev/usb/controller/ohci.c') diff --git a/sys/dev/usb/controller/ohci.c b/sys/dev/usb/controller/ohci.c index 206c753..93785c0 100644 --- a/sys/dev/usb/controller/ohci.c +++ b/sys/dev/usb/controller/ohci.c @@ -2437,7 +2437,7 @@ ohci_xfer_setup(struct usb_setup_params *parm) usbd_transfer_setup_sub(parm); nitd = ((xfer->max_data_length / OHCI_PAGE_SIZE) + - ((xfer->nframes + OHCI_ITD_NOFFSET - 1) / OHCI_ITD_NOFFSET) + + howmany(xfer->nframes, OHCI_ITD_NOFFSET) + 1 /* EXTRA */ ); ntd = 0; nqh = 1; -- cgit v1.1