Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: clocksource: Save mult_orig in clocksource_disable()
This commit is contained in:
commit
6eb80e00bf
|
@ -293,7 +293,12 @@ static inline int clocksource_enable(struct clocksource *cs)
|
||||||
if (cs->enable)
|
if (cs->enable)
|
||||||
ret = cs->enable(cs);
|
ret = cs->enable(cs);
|
||||||
|
|
||||||
/* save mult_orig on enable */
|
/*
|
||||||
|
* The frequency may have changed while the clocksource
|
||||||
|
* was disabled. If so the code in ->enable() must update
|
||||||
|
* the mult value to reflect the new frequency. Make sure
|
||||||
|
* mult_orig follows this change.
|
||||||
|
*/
|
||||||
cs->mult_orig = cs->mult;
|
cs->mult_orig = cs->mult;
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
@ -309,6 +314,13 @@ static inline int clocksource_enable(struct clocksource *cs)
|
||||||
*/
|
*/
|
||||||
static inline void clocksource_disable(struct clocksource *cs)
|
static inline void clocksource_disable(struct clocksource *cs)
|
||||||
{
|
{
|
||||||
|
/*
|
||||||
|
* Save mult_orig in mult so clocksource_enable() can
|
||||||
|
* restore the value regardless if ->enable() updates
|
||||||
|
* the value of mult or not.
|
||||||
|
*/
|
||||||
|
cs->mult = cs->mult_orig;
|
||||||
|
|
||||||
if (cs->disable)
|
if (cs->disable)
|
||||||
cs->disable(cs);
|
cs->disable(cs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue