platform: msm_shared: Use 64-bit arithmetic while calculating delays.
Crs-Fixed: 514029
Change-Id: I0a9f51fb3baa305ffbab83e68454a125b096668f
diff --git a/platform/msm_shared/qtimer.c b/platform/msm_shared/qtimer.c
index bf9de81..c8d6bd7 100644
--- a/platform/msm_shared/qtimer.c
+++ b/platform/msm_shared/qtimer.c
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012, The Linux Foundation. All rights reserved.
+/* Copyright (c) 2012-2013, The Linux Foundation. All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
@@ -93,7 +93,7 @@
{
uint64_t ticks;
- ticks = (msecs * ticks_per_sec) / 1000;
+ ticks = ((uint64_t) msecs * ticks_per_sec) / 1000;
delay(ticks);
}
@@ -102,7 +102,7 @@
{
uint64_t ticks;
- ticks = (usecs * ticks_per_sec) / 1000000;
+ ticks = ((uint64_t) usecs * ticks_per_sec) / 1000000;
delay(ticks);
}