Commit fba9e072 authored by John Stultz's avatar John Stultz Committed by Ingo Molnar

clocksource: Rename __clocksource_updatefreq_*() to __clocksource_update_freq_*()

Ingo requested this function be renamed to improve readability,
so I've renamed __clocksource_updatefreq_scale() as well as the
__clocksource_updatefreq_hz/khz() functions to avoid
squishedtogethernames.

This touches some of the sh clocksources, which I've not tested.

The arch/arm/plat-omap change is just a comment change for
consistency.
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Dave Jones <davej@codemonkey.org.uk>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Stephen Boyd <sboyd@codeaurora.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Link: http://lkml.kernel.org/r/1426133800-29329-13-git-send-email-john.stultz@linaro.orgSigned-off-by: default avatarIngo Molnar <mingo@kernel.org>
parent 8cc8c525
...@@ -103,7 +103,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase) ...@@ -103,7 +103,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase)
/* /*
* 120000 rough estimate from the calculations in * 120000 rough estimate from the calculations in
* __clocksource_updatefreq_scale. * __clocksource_update_freq_scale.
*/ */
clocks_calc_mult_shift(&persistent_mult, &persistent_shift, clocks_calc_mult_shift(&persistent_mult, &persistent_shift,
32768, NSEC_PER_SEC, 120000); 32768, NSEC_PER_SEC, 120000);
......
...@@ -210,7 +210,7 @@ static int em_sti_clocksource_enable(struct clocksource *cs) ...@@ -210,7 +210,7 @@ static int em_sti_clocksource_enable(struct clocksource *cs)
ret = em_sti_start(p, USER_CLOCKSOURCE); ret = em_sti_start(p, USER_CLOCKSOURCE);
if (!ret) if (!ret)
__clocksource_updatefreq_hz(cs, p->rate); __clocksource_update_freq_hz(cs, p->rate);
return ret; return ret;
} }
......
...@@ -641,7 +641,7 @@ static int sh_cmt_clocksource_enable(struct clocksource *cs) ...@@ -641,7 +641,7 @@ static int sh_cmt_clocksource_enable(struct clocksource *cs)
ret = sh_cmt_start(ch, FLAG_CLOCKSOURCE); ret = sh_cmt_start(ch, FLAG_CLOCKSOURCE);
if (!ret) { if (!ret) {
__clocksource_updatefreq_hz(cs, ch->rate); __clocksource_update_freq_hz(cs, ch->rate);
ch->cs_enabled = true; ch->cs_enabled = true;
} }
return ret; return ret;
......
...@@ -272,7 +272,7 @@ static int sh_tmu_clocksource_enable(struct clocksource *cs) ...@@ -272,7 +272,7 @@ static int sh_tmu_clocksource_enable(struct clocksource *cs)
ret = sh_tmu_enable(ch); ret = sh_tmu_enable(ch);
if (!ret) { if (!ret) {
__clocksource_updatefreq_hz(cs, ch->rate); __clocksource_update_freq_hz(cs, ch->rate);
ch->cs_enabled = true; ch->cs_enabled = true;
} }
......
...@@ -200,7 +200,7 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); ...@@ -200,7 +200,7 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec);
extern int extern int
__clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq); __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq);
extern void extern void
__clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq); __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 freq);
/* /*
* Don't call this unless you are a default clocksource * Don't call this unless you are a default clocksource
...@@ -221,14 +221,14 @@ static inline int clocksource_register_khz(struct clocksource *cs, u32 khz) ...@@ -221,14 +221,14 @@ static inline int clocksource_register_khz(struct clocksource *cs, u32 khz)
return __clocksource_register_scale(cs, 1000, khz); return __clocksource_register_scale(cs, 1000, khz);
} }
static inline void __clocksource_updatefreq_hz(struct clocksource *cs, u32 hz) static inline void __clocksource_update_freq_hz(struct clocksource *cs, u32 hz)
{ {
__clocksource_updatefreq_scale(cs, 1, hz); __clocksource_update_freq_scale(cs, 1, hz);
} }
static inline void __clocksource_updatefreq_khz(struct clocksource *cs, u32 khz) static inline void __clocksource_update_freq_khz(struct clocksource *cs, u32 khz)
{ {
__clocksource_updatefreq_scale(cs, 1000, khz); __clocksource_update_freq_scale(cs, 1000, khz);
} }
......
...@@ -643,7 +643,7 @@ static void clocksource_enqueue(struct clocksource *cs) ...@@ -643,7 +643,7 @@ static void clocksource_enqueue(struct clocksource *cs)
} }
/** /**
* __clocksource_updatefreq_scale - Used update clocksource with new freq * __clocksource_update_freq_scale - Used update clocksource with new freq
* @cs: clocksource to be registered * @cs: clocksource to be registered
* @scale: Scale factor multiplied against freq to get clocksource hz * @scale: Scale factor multiplied against freq to get clocksource hz
* @freq: clocksource frequency (cycles per second) divided by scale * @freq: clocksource frequency (cycles per second) divided by scale
...@@ -651,9 +651,10 @@ static void clocksource_enqueue(struct clocksource *cs) ...@@ -651,9 +651,10 @@ static void clocksource_enqueue(struct clocksource *cs)
* This should only be called from the clocksource->enable() method. * This should only be called from the clocksource->enable() method.
* *
* This *SHOULD NOT* be called directly! Please use the * This *SHOULD NOT* be called directly! Please use the
* clocksource_updatefreq_hz() or clocksource_updatefreq_khz helper functions. * __clocksource_update_freq_hz() or __clocksource_update_freq_khz() helper
* functions.
*/ */
void __clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq) void __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 freq)
{ {
u64 sec; u64 sec;
...@@ -707,7 +708,7 @@ void __clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq) ...@@ -707,7 +708,7 @@ void __clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq)
pr_info("clocksource %s: mask: 0x%llx max_cycles: 0x%llx, max_idle_ns: %lld ns\n", pr_info("clocksource %s: mask: 0x%llx max_cycles: 0x%llx, max_idle_ns: %lld ns\n",
cs->name, cs->mask, cs->max_cycles, cs->max_idle_ns); cs->name, cs->mask, cs->max_cycles, cs->max_idle_ns);
} }
EXPORT_SYMBOL_GPL(__clocksource_updatefreq_scale); EXPORT_SYMBOL_GPL(__clocksource_update_freq_scale);
/** /**
* __clocksource_register_scale - Used to install new clocksources * __clocksource_register_scale - Used to install new clocksources
...@@ -724,7 +725,7 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq) ...@@ -724,7 +725,7 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq)
{ {
/* Initialize mult/shift and max_idle_ns */ /* Initialize mult/shift and max_idle_ns */
__clocksource_updatefreq_scale(cs, scale, freq); __clocksource_update_freq_scale(cs, scale, freq);
/* Add clocksource to the clocksource list */ /* Add clocksource to the clocksource list */
mutex_lock(&clocksource_mutex); mutex_lock(&clocksource_mutex);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment