diff options
author | pfg <pfg@FreeBSD.org> | 2016-04-26 15:03:15 +0000 |
---|---|---|
committer | pfg <pfg@FreeBSD.org> | 2016-04-26 15:03:15 +0000 |
commit | 96555d383362c30d444593333d60a4588416db62 (patch) | |
tree | df1bb710ebf946f1a7c1b38464ef836fddfee71c /sys/dev/usb/controller/ohci.c | |
parent | 8f98488963488a3a64220dd06361d0286c15cdb4 (diff) | |
download | FreeBSD-src-96555d383362c30d444593333d60a4588416db62.zip FreeBSD-src-96555d383362c30d444593333d60a4588416db62.tar.gz |
sys/dev: extend use of the howmany() macro when available.
We have a howmany() macro in the <sys/param.h> header that is
convenient to re-use as it makes things easier to read.
Diffstat (limited to 'sys/dev/usb/controller/ohci.c')
-rw-r--r-- | sys/dev/usb/controller/ohci.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |