This patch fixes following build warning.
drivers/built-in.o: In function `oz_hcd_heartbeat':
>> (.text+0x30aadd): undefined reference to `__divdi3'
drivers/built-in.o: In function `oz_hcd_heartbeat':
>> (.text+0x30ac85): undefined reference to `__divdi3'
Reported-by: Randy Dunlap <rdunlap@infradead.org>
Signed-off-by: Rupesh Gujare <rupesh.gujare@atmel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (ep->credit < 0)
continue;
delta = timespec_sub(ts, ep->timestamp);
- ep->credit += timespec_to_ns(&delta) / NSEC_PER_MSEC;
+ ep->credit += div_u64(timespec_to_ns(&delta), NSEC_PER_MSEC);
if (ep->credit > ep->credit_ceiling)
ep->credit = ep->credit_ceiling;
ep->timestamp = ts;
continue;
}
delta = timespec_sub(ts, ep->timestamp);
- ep->credit += timespec_to_ns(&delta) / NSEC_PER_MSEC;
+ ep->credit += div_u64(timespec_to_ns(&delta), NSEC_PER_MSEC);
ep->timestamp = ts;
while (!list_empty(&ep->urb_list)) {
struct oz_urb_link *urbl =