]> git.baikalelectronics.ru Git - kernel.git/commit
clocksource: add enable() and disable() callbacks
authorMagnus Damm <damm@igel.co.jp>
Tue, 21 Apr 2009 19:24:02 +0000 (12:24 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 21 Apr 2009 20:41:47 +0000 (13:41 -0700)
commitfb1c7ba69d3dbc424bbbb3ab6248e2c9e5b7840f
treee4bb5eeaa252ede053abc6b3c4d15c4127ce7a32
parent4304b8950e14002e694ca472a5b95ee092d75548
clocksource: add enable() and disable() callbacks

Add enable() and disable() callbacks for clocksources.

This allows us to put unused clocksources in power save mode.  The
functions clocksource_enable() and clocksource_disable() wrap the
callbacks and are inserted in the timekeeping code to enable before use
and disable after switching to a new clocksource.

Signed-off-by: Magnus Damm <damm@igel.co.jp>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/clocksource.h
kernel/time/timekeeping.c