*
* Math helper, returns latch value converted to nanoseconds (bound checked)
*/
-unsigned long clockevent_delta2ns(unsigned long latch,
+unsigned long long clockevent_delta2ns(unsigned long latch,
struct clock_event_device *evt)
{
u64 clc = ((u64) latch << evt->shift);
do_div(clc, evt->mult);
if (clc < 1000)
clc = 1000;
- if (clc > LONG_MAX)
- clc = LONG_MAX;
+ if (clc > LLONG_MAX)
+ clc = LLONG_MAX;
- return (unsigned long) clc;
+ return (unsigned long long) clc;
}
/**