[PATCH] staging: ozwpan: Fix build warning.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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'

Signed-off-by: Rupesh Gujare <rupesh.gujare@xxxxxxxxx>
---
 drivers/staging/ozwpan/ozhcd.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/ozwpan/ozhcd.c b/drivers/staging/ozwpan/ozhcd.c
index f81a0c5..db9c81e 100644
--- a/drivers/staging/ozwpan/ozhcd.c
+++ b/drivers/staging/ozwpan/ozhcd.c
@@ -1042,7 +1042,7 @@ int oz_hcd_heartbeat(void *hport)
 		if (ep->credit < 0)
 			continue;
 		delta = timespec_sub(ts, ep->timestamp);
-		ep->credit += timespec_to_ns(&delta) / NSEC_PER_MSEC;
+		ep->credit += div64_u64(timespec_to_ns(&delta), NSEC_PER_MSEC);
 		if (ep->credit > ep->credit_ceiling)
 			ep->credit = ep->credit_ceiling;
 		ep->timestamp = ts;
@@ -1086,7 +1086,7 @@ int oz_hcd_heartbeat(void *hport)
 			continue;
 		}
 		delta = timespec_sub(ts, ep->timestamp);
-		ep->credit += timespec_to_ns(&delta) / NSEC_PER_MSEC;
+		ep->credit += div64_u64(timespec_to_ns(&delta), NSEC_PER_MSEC);
 		ep->timestamp = ts;
 		while (!list_empty(&ep->urb_list)) {
 			struct oz_urb_link *urbl =
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux