clocksource: Extract max nsec calculation into separate function
authorStephen Boyd <sboyd@codeaurora.org>
Thu, 18 Jul 2013 23:21:14 +0000 (16:21 -0700)
committerAjay Nandakumar <anandakumarm@nvidia.com>
Mon, 13 Jan 2014 06:33:38 +0000 (11:33 +0530)
commit9d0d2b04cb0c40e3c177b3cd64af5136b5648ea1
tree95e8ff0e17da69e1b33f292b94f782d58e9ce212
parent743856ddcc3bde28f225fc836e433f1feabf20b4
clocksource: Extract max nsec calculation into separate function

We need to calculate the same number in the clocksource code and
the sched_clock code, so extract this code into its own function.
We also drop the min_t and just use min() because the two types
are the same.

Bug 1399318

Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
(cherry picked from commit 87d8b9eb7eb6669aad6435a51e9862362141ba76)
Signed-off-by: Ajay Nandakumar <anandakumarm@nvidia.com>
Change-Id: Id1208090d9fcc282a162ce6fdb5e4a64d0b33907
include/linux/clocksource.h
kernel/time/clocksource.c