Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 297379
b: refs/heads/master
c: f695cf9
h: refs/heads/master
i:
  297377: 24e139e
  297375: b2c92e8
v: v3
  • Loading branch information
John Stultz committed Mar 16, 2012
1 parent 3b4ceb9 commit a93039e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: a939e817aa7e199d2fff05a67cb745be32dd5c2d
refs/heads/master: f695cf94837de53864180400cbac42cfa370426f
7 changes: 7 additions & 0 deletions trunk/kernel/time/timekeeping.c
Original file line number Diff line number Diff line change
Expand Up @@ -448,16 +448,23 @@ EXPORT_SYMBOL(timekeeping_inject_offset);
static int change_clocksource(void *data)
{
struct clocksource *new, *old;
unsigned long flags;

new = (struct clocksource *) data;

write_seqlock_irqsave(&timekeeper.lock, flags);

timekeeping_forward_now();
if (!new->enable || new->enable(new) == 0) {
old = timekeeper.clock;
timekeeper_setup_internals(new);
if (old->disable)
old->disable(old);
}
timekeeping_update(true);

write_sequnlock_irqrestore(&timekeeper.lock, flags);

return 0;
}

Expand Down

0 comments on commit a93039e

Please sign in to comment.