diff options
author | john stultz <johnstul@us.ibm.com> | 2006-06-26 00:25:14 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-26 09:58:21 -0700 |
commit | a275254975a29c51929ee175b92ac471ac2a0043 (patch) | |
tree | 42ec41bf74c0c601f05ed12ff674539f4bf6f505 /kernel | |
parent | 5d0cf410e94b1f1ff852c3f210d22cc6c5a27ffa (diff) |
[PATCH] time: rename clocksource functions
As suggested by Roman Zippel, change clocksource functions to use
clocksource_xyz rather then xyz_clocksource to avoid polluting the
namespace.
Signed-off-by: John Stultz <johnstul@us.ibm.com>
Cc: Roman Zippel <zippel@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/time/clocksource.c | 16 | ||||
-rw-r--r-- | kernel/time/jiffies.c | 2 | ||||
-rw-r--r-- | kernel/timer.c | 20 |
3 files changed, 19 insertions, 19 deletions
diff --git a/kernel/time/clocksource.c b/kernel/time/clocksource.c index a9f387ea83b..74eca5939bd 100644 --- a/kernel/time/clocksource.c +++ b/kernel/time/clocksource.c @@ -65,10 +65,10 @@ static int __init clocksource_done_booting(void) late_initcall(clocksource_done_booting); /** - * get_next_clocksource - Returns the selected clocksource + * clocksource_get_next - Returns the selected clocksource * */ -struct clocksource *get_next_clocksource(void) +struct clocksource *clocksource_get_next(void) { unsigned long flags; @@ -142,12 +142,12 @@ static int is_registered_source(struct clocksource *c) } /** - * register_clocksource - Used to install new clocksources + * clocksource_register - Used to install new clocksources * @t: clocksource to be registered * * Returns -EBUSY if registration fails, zero otherwise. */ -int register_clocksource(struct clocksource *c) +int clocksource_register(struct clocksource *c) { int ret = 0; unsigned long flags; @@ -167,17 +167,16 @@ int register_clocksource(struct clocksource *c) spin_unlock_irqrestore(&clocksource_lock, flags); return ret; } - -EXPORT_SYMBOL(register_clocksource); +EXPORT_SYMBOL(clocksource_register); /** - * reselect_clocksource - Rescan list for next clocksource + * clocksource_reselect - Rescan list for next clocksource * * A quick helper function to be used if a clocksource changes its * rating. Forces the clocksource list to be re-scanned for the best * clocksource. */ -void reselect_clocksource(void) +void clocksource_reselect(void) { unsigned long flags; @@ -185,6 +184,7 @@ void reselect_clocksource(void) next_clocksource = select_clocksource(); spin_unlock_irqrestore(&clocksource_lock, flags); } +EXPORT_SYMBOL(clocksource_reselect); /** * sysfs_show_current_clocksources - sysfs interface for current clocksource diff --git a/kernel/time/jiffies.c b/kernel/time/jiffies.c index 1fe8376e717..126bb30c4af 100644 --- a/kernel/time/jiffies.c +++ b/kernel/time/jiffies.c @@ -67,7 +67,7 @@ struct clocksource clocksource_jiffies = { static int __init init_jiffies_clocksource(void) { - return register_clocksource(&clocksource_jiffies); + return clocksource_register(&clocksource_jiffies); } module_init(init_jiffies_clocksource); diff --git a/kernel/timer.c b/kernel/timer.c index e5adb9e2e7a..890a56937cf 100644 --- a/kernel/timer.c +++ b/kernel/timer.c @@ -810,7 +810,7 @@ static inline s64 __get_nsec_offset(void) s64 ns_offset; /* read clocksource: */ - cycle_now = read_clocksource(clock); + cycle_now = clocksource_read(clock); /* calculate the delta since the last update_wall_time: */ cycle_delta = (cycle_now - last_clock_cycle) & clock->mask; @@ -845,7 +845,7 @@ static inline void __get_realtime_clock_ts(struct timespec *ts) } /** - * get_realtime_clock_ts - Returns the time of day in a timespec + * getnstimeofday - Returns the time of day in a timespec * @ts: pointer to the timespec to be set * * Returns the time of day in a timespec. @@ -920,9 +920,9 @@ static int change_clocksource(void) struct clocksource *new; cycle_t now; u64 nsec; - new = get_next_clocksource(); + new = clocksource_get_next(); if (clock != new) { - now = read_clocksource(new); + now = clocksource_read(new); nsec = __get_nsec_offset(); timespec_add_ns(&xtime, nsec); @@ -966,9 +966,9 @@ void __init timekeeping_init(void) unsigned long flags; write_seqlock_irqsave(&xtime_lock, flags); - clock = get_next_clocksource(); - calculate_clocksource_interval(clock, tick_nsec); - last_clock_cycle = read_clocksource(clock); + clock = clocksource_get_next(); + clocksource_calculate_interval(clock, tick_nsec); + last_clock_cycle = clocksource_read(clock); ntp_clear(); write_sequnlock_irqrestore(&xtime_lock, flags); } @@ -988,7 +988,7 @@ static int timekeeping_resume(struct sys_device *dev) write_seqlock_irqsave(&xtime_lock, flags); /* restart the last cycle value */ - last_clock_cycle = read_clocksource(clock); + last_clock_cycle = clocksource_read(clock); write_sequnlock_irqrestore(&xtime_lock, flags); return 0; } @@ -1028,7 +1028,7 @@ static void update_wall_time(void) snsecs_per_sec = (s64)NSEC_PER_SEC << clock->shift; remainder_snsecs += (s64)xtime.tv_nsec << clock->shift; - now = read_clocksource(clock); + now = clocksource_read(clock); offset = (now - last_clock_cycle)&clock->mask; /* normally this loop will run just once, however in the @@ -1069,7 +1069,7 @@ static void update_wall_time(void) if (change_clocksource()) { error = 0; remainder_snsecs = 0; - calculate_clocksource_interval(clock, tick_nsec); + clocksource_calculate_interval(clock, tick_nsec); } } |