USB: NS_TO_US should round up
authorAlan Stern <stern@rowland.harvard.edu>
Fri, 11 Oct 2013 15:28:02 +0000 (11:28 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Oct 2013 23:37:45 +0000 (16:37 -0700)
commit63fb3a280061c5a1d9190015e5a074213f9d23c0
treed19fa5a572dfc898651194b3ab50848035cc423a
parent6ec4147e7bdbde168f5bce30de5984aa4f971b22
USB: NS_TO_US should round up

Host controller drivers use the NS_TO_US macro to convert transaction
times, which are computed in nanoseconds, to microseconds for
scheduling.  Periodic scheduling requires worst-case estimates, but
the macro does its conversion using round-to-nearest.  This patch
changes it to use round-up, giving a correct worst-case value.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/usb/hcd.h