diff options
author | John Stultz <john.stultz@linaro.org> | 2015-03-12 00:16:40 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2015-03-13 03:07:08 -0400 |
commit | fba9e07208c0f9d92d9f73761c99c8612039da44 (patch) | |
tree | aaada64e62491aa6a8ee64ed18862bb502a81aa0 | |
parent | 8cc8c525ad4e7b581cacf84119e1a28dcb4044db (diff) |
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: John 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.org
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/arm/plat-omap/counter_32k.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/em_sti.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/sh_cmt.c | 2 | ||||
-rw-r--r-- | drivers/clocksource/sh_tmu.c | 2 | ||||
-rw-r--r-- | include/linux/clocksource.h | 10 | ||||
-rw-r--r-- | kernel/time/clocksource.c | 11 |
6 files changed, 15 insertions, 14 deletions
diff --git a/arch/arm/plat-omap/counter_32k.c b/arch/arm/plat-omap/counter_32k.c index 61b4d705c267..43cf74561cfd 100644 --- a/arch/arm/plat-omap/counter_32k.c +++ b/arch/arm/plat-omap/counter_32k.c | |||
@@ -103,7 +103,7 @@ int __init omap_init_clocksource_32k(void __iomem *vbase) | |||
103 | 103 | ||
104 | /* | 104 | /* |
105 | * 120000 rough estimate from the calculations in | 105 | * 120000 rough estimate from the calculations in |
106 | * __clocksource_updatefreq_scale. | 106 | * __clocksource_update_freq_scale. |
107 | */ | 107 | */ |
108 | clocks_calc_mult_shift(&persistent_mult, &persistent_shift, | 108 | clocks_calc_mult_shift(&persistent_mult, &persistent_shift, |
109 | 32768, NSEC_PER_SEC, 120000); | 109 | 32768, NSEC_PER_SEC, 120000); |
diff --git a/drivers/clocksource/em_sti.c b/drivers/clocksource/em_sti.c index d0a7bd66b8b9..dc3c6ee04aaa 100644 --- a/drivers/clocksource/em_sti.c +++ b/drivers/clocksource/em_sti.c | |||
@@ -210,7 +210,7 @@ static int em_sti_clocksource_enable(struct clocksource *cs) | |||
210 | 210 | ||
211 | ret = em_sti_start(p, USER_CLOCKSOURCE); | 211 | ret = em_sti_start(p, USER_CLOCKSOURCE); |
212 | if (!ret) | 212 | if (!ret) |
213 | __clocksource_updatefreq_hz(cs, p->rate); | 213 | __clocksource_update_freq_hz(cs, p->rate); |
214 | return ret; | 214 | return ret; |
215 | } | 215 | } |
216 | 216 | ||
diff --git a/drivers/clocksource/sh_cmt.c b/drivers/clocksource/sh_cmt.c index 2bd13b53b727..b8ff3c64cc45 100644 --- a/drivers/clocksource/sh_cmt.c +++ b/drivers/clocksource/sh_cmt.c | |||
@@ -641,7 +641,7 @@ static int sh_cmt_clocksource_enable(struct clocksource *cs) | |||
641 | 641 | ||
642 | ret = sh_cmt_start(ch, FLAG_CLOCKSOURCE); | 642 | ret = sh_cmt_start(ch, FLAG_CLOCKSOURCE); |
643 | if (!ret) { | 643 | if (!ret) { |
644 | __clocksource_updatefreq_hz(cs, ch->rate); | 644 | __clocksource_update_freq_hz(cs, ch->rate); |
645 | ch->cs_enabled = true; | 645 | ch->cs_enabled = true; |
646 | } | 646 | } |
647 | return ret; | 647 | return ret; |
diff --git a/drivers/clocksource/sh_tmu.c b/drivers/clocksource/sh_tmu.c index f150ca82bfaf..b6b8fa3cd211 100644 --- a/drivers/clocksource/sh_tmu.c +++ b/drivers/clocksource/sh_tmu.c | |||
@@ -272,7 +272,7 @@ static int sh_tmu_clocksource_enable(struct clocksource *cs) | |||
272 | 272 | ||
273 | ret = sh_tmu_enable(ch); | 273 | ret = sh_tmu_enable(ch); |
274 | if (!ret) { | 274 | if (!ret) { |
275 | __clocksource_updatefreq_hz(cs, ch->rate); | 275 | __clocksource_update_freq_hz(cs, ch->rate); |
276 | ch->cs_enabled = true; | 276 | ch->cs_enabled = true; |
277 | } | 277 | } |
278 | 278 | ||
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index bd98eaa4d005..135509821c39 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -200,7 +200,7 @@ clocks_calc_mult_shift(u32 *mult, u32 *shift, u32 from, u32 to, u32 minsec); | |||
200 | extern int | 200 | extern int |
201 | __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq); | 201 | __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq); |
202 | extern void | 202 | extern void |
203 | __clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq); | 203 | __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 freq); |
204 | 204 | ||
205 | /* | 205 | /* |
206 | * Don't call this unless you are a default clocksource | 206 | * 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 | return __clocksource_register_scale(cs, 1000, khz); | 221 | return __clocksource_register_scale(cs, 1000, khz); |
222 | } | 222 | } |
223 | 223 | ||
224 | static inline void __clocksource_updatefreq_hz(struct clocksource *cs, u32 hz) | 224 | static inline void __clocksource_update_freq_hz(struct clocksource *cs, u32 hz) |
225 | { | 225 | { |
226 | __clocksource_updatefreq_scale(cs, 1, hz); | 226 | __clocksource_update_freq_scale(cs, 1, hz); |
227 | } | 227 | } |
228 | 228 | ||
229 | static inline void __clocksource_updatefreq_khz(struct clocksource *cs, u32 khz) | 229 | static inline void __clocksource_update_freq_khz(struct clocksource *cs, u32 khz) |
230 | { | 230 | { |
231 | __clocksource_updatefreq_scale(cs, 1000, khz); | 231 | __clocksource_update_freq_scale(cs, 1000, khz); |
232 | } | 232 | } |
233 | 233 | ||
234 | 234 | ||
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index 1977ebabd922..c3be3c71bbad 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c | |||
@@ -643,7 +643,7 @@ static void clocksource_enqueue(struct clocksource *cs) | |||
643 | } | 643 | } |
644 | 644 | ||
645 | /** | 645 | /** |
646 | * __clocksource_updatefreq_scale - Used update clocksource with new freq | 646 | * __clocksource_update_freq_scale - Used update clocksource with new freq |
647 | * @cs: clocksource to be registered | 647 | * @cs: clocksource to be registered |
648 | * @scale: Scale factor multiplied against freq to get clocksource hz | 648 | * @scale: Scale factor multiplied against freq to get clocksource hz |
649 | * @freq: clocksource frequency (cycles per second) divided by scale | 649 | * @freq: clocksource frequency (cycles per second) divided by scale |
@@ -651,9 +651,10 @@ static void clocksource_enqueue(struct clocksource *cs) | |||
651 | * This should only be called from the clocksource->enable() method. | 651 | * This should only be called from the clocksource->enable() method. |
652 | * | 652 | * |
653 | * This *SHOULD NOT* be called directly! Please use the | 653 | * This *SHOULD NOT* be called directly! Please use the |
654 | * clocksource_updatefreq_hz() or clocksource_updatefreq_khz helper functions. | 654 | * __clocksource_update_freq_hz() or __clocksource_update_freq_khz() helper |
655 | * functions. | ||
655 | */ | 656 | */ |
656 | void __clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq) | 657 | void __clocksource_update_freq_scale(struct clocksource *cs, u32 scale, u32 freq) |
657 | { | 658 | { |
658 | u64 sec; | 659 | u64 sec; |
659 | 660 | ||
@@ -707,7 +708,7 @@ void __clocksource_updatefreq_scale(struct clocksource *cs, u32 scale, u32 freq) | |||
707 | pr_info("clocksource %s: mask: 0x%llx max_cycles: 0x%llx, max_idle_ns: %lld ns\n", | 708 | pr_info("clocksource %s: mask: 0x%llx max_cycles: 0x%llx, max_idle_ns: %lld ns\n", |
708 | cs->name, cs->mask, cs->max_cycles, cs->max_idle_ns); | 709 | cs->name, cs->mask, cs->max_cycles, cs->max_idle_ns); |
709 | } | 710 | } |
710 | EXPORT_SYMBOL_GPL(__clocksource_updatefreq_scale); | 711 | EXPORT_SYMBOL_GPL(__clocksource_update_freq_scale); |
711 | 712 | ||
712 | /** | 713 | /** |
713 | * __clocksource_register_scale - Used to install new clocksources | 714 | * __clocksource_register_scale - Used to install new clocksources |
@@ -724,7 +725,7 @@ int __clocksource_register_scale(struct clocksource *cs, u32 scale, u32 freq) | |||
724 | { | 725 | { |
725 | 726 | ||
726 | /* Initialize mult/shift and max_idle_ns */ | 727 | /* Initialize mult/shift and max_idle_ns */ |
727 | __clocksource_updatefreq_scale(cs, scale, freq); | 728 | __clocksource_update_freq_scale(cs, scale, freq); |
728 | 729 | ||
729 | /* Add clocksource to the clocksource list */ | 730 | /* Add clocksource to the clocksource list */ |
730 | mutex_lock(&clocksource_mutex); | 731 | mutex_lock(&clocksource_mutex); |