[PATCH 3/3] clocksource: get rid of clocksource_calc_mult_shift()

From: Yong Zhang
Date: Thu Dec 01 2011 - 02:21:04 EST


Encourage the user to use clocksource_register_hz/khz(), and
lose the burden of maintainer.

Signed-off-by: Yong Zhang <yong.zhang0@xxxxxxxxx>
Cc: John Stultz <johnstul@xxxxxxxxxx>
Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
---
include/linux/clocksource.h | 3 ---
kernel/time/clocksource.c | 19 -------------------
2 files changed, 0 insertions(+), 22 deletions(-)

diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index a02a8d7..f018278 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -314,9 +314,6 @@ static inline void __clocksource_updatefreq_khz(struct clocksource *cs, u32 khz)
__clocksource_updatefreq_scale(cs, 1000, khz);
}

-extern void
-clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec);
-
#ifdef CONFIG_GENERIC_TIME_VSYSCALL
extern void
update_vsyscall(struct timespec *ts, struct timespec *wtm,
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c
index 5119042..a75bd7b 100644
--- a/kernel/time/clocksource.c
+++ b/kernel/time/clocksource.c
@@ -724,25 +724,6 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)
}
EXPORT_SYMBOL_GPL(__clocksource_register_scale);

-void clocksource_calc_mult_shift(struct clocksource *cs, u32 freq, u32 minsec)
-{
- clocks_calc_mult_shift(&cs->mult, &cs->shift, freq,
- NSEC_PER_SEC, minsec);
-
- /*
- * for clocksources that have large mults, to avoid overflow.
- * Since mult may be adjusted by ntp, add an safety extra margin
- *
- */
- cs->maxadj = clocksource_max_adjustment(cs);
- while ((cs->mult + cs->maxadj < cs->mult)
- || (cs->mult - cs->maxadj > cs->mult)) {
- cs->mult >>= 1;
- cs->shift--;
- cs->maxadj = clocksource_max_adjustment(cs);
- }
-}
-
/**
* clocksource_register - Used to install new clocksources
* @t: clocksource to be registered
--
1.7.5.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/