summaryrefslogtreecommitdiff
path: root/kernel/time/clocksource.c
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2016-06-21 09:22:51 +0300
committerThomas Gleixner <tglx@linutronix.de>2016-06-21 09:22:51 +0300
commitc7d6b5a22c00a19b513353469d89062264a7235f (patch)
treee693b4d3cd596471a2516529d6ef5c3ed9efcbdc /kernel/time/clocksource.c
parent86721ab63b61ef1dd7305308e4049f644703decf (diff)
parent7c71feb0a6766c7c3a262e3cc33ae231f3953cb6 (diff)
downloadlinux-c7d6b5a22c00a19b513353469d89062264a7235f.tar.xz
Merge branch 'fortglx/4.8/time' of https://git.linaro.org/people/john.stultz/linux into timers/core
Pull time(keeping) updates from John Stultz: - Handle the 1ns issue with the old refusing to die vsyscall machinery - More y2038 updates - Documentation fixes - Simplify clocksource handling
Diffstat (limited to 'kernel/time/clocksource.c')
-rw-r--r--kernel/time/clocksource.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 56ece145a814..6a5a310a1a53 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -669,10 +669,12 @@ static void clocksource_enqueue(struct clocksource *cs)
struct list_head *entry = &clocksource_list;
struct clocksource *tmp;
- list_for_each_entry(tmp, &clocksource_list, list)
+ list_for_each_entry(tmp, &clocksource_list, list) {
/* Keep track of the place, where to insert */
- if (tmp->rating >= cs->rating)
- entry = &tmp->list;
+ if (tmp->rating < cs->rating)
+ break;
+ entry = &tmp->list;
+ }
list_add(&cs->list, entry);
}