clocksource: add suspend callback
authorMagnus Damm <damm@opensource.se>
Tue, 2 Feb 2010 22:41:41 +0000 (14:41 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 5 Feb 2010 13:54:10 +0000 (14:54 +0100)
commitc54a42b19fbaae4e9f212322ecca25a6bc95c1ba
tree2c929d3cde3b4ae864d5f5a50bdda688fd5293eb
parent17622339af2536b32cf29699ddd4ba0fe79a61d5
clocksource: add suspend callback

Add a clocksource suspend callback.  This callback can be used by the
clocksource driver to shutdown and perform any kind of late suspend
activities even though the clocksource driver itself is a non-sysdev
driver.

One example where this is useful is to fix the sh_cmt.c platform driver
that today suspends using the platform bus and shuts down the clocksource
too early.

With this callback in place the sh_cmt driver will suspend using the
clocksource and clockevent hooks and leave the platform device pm
callbacks unused.

Signed-off-by: Magnus Damm <damm@opensource.se>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: john stultz <johnstul@us.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
include/linux/clocksource.h
kernel/time/clocksource.c
kernel/time/timekeeping.c