aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/timer.c
diff options
context:
space:
mode:
authorjohn stultz <johnstul@us.ibm.com>2006-06-26 03:25:14 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-26 12:58:21 -0400
commita275254975a29c51929ee175b92ac471ac2a0043 (patch)
tree42ec41bf74c0c601f05ed12ff674539f4bf6f505 /kernel/timer.c
parent5d0cf410e94b1f1ff852c3f210d22cc6c5a27ffa (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/timer.c')
-rw-r--r--kernel/timer.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/kernel/timer.c b/kernel/timer.c
index e5adb9e2e7a7..890a56937cfa 100644
--- a/kernel/timer.c
+++ b/kernel/timer.c
@@ -810,7 +810,7 @@ static inline s64 __get_nsec_offset(void)
810 s64 ns_offset; 810 s64 ns_offset;
811 811
812 /* read clocksource: */ 812 /* read clocksource: */
813 cycle_now = read_clocksource(clock); 813 cycle_now = clocksource_read(clock);
814 814
815 /* calculate the delta since the last update_wall_time: */ 815 /* calculate the delta since the last update_wall_time: */
816 cycle_delta = (cycle_now - last_clock_cycle) & clock->mask; 816 cycle_delta = (cycle_now - last_clock_cycle) & clock->mask;
@@ -845,7 +845,7 @@ static inline void __get_realtime_clock_ts(struct timespec *ts)
845} 845}
846 846
847/** 847/**
848 * get_realtime_clock_ts - Returns the time of day in a timespec 848 * getnstimeofday - Returns the time of day in a timespec
849 * @ts: pointer to the timespec to be set 849 * @ts: pointer to the timespec to be set
850 * 850 *
851 * Returns the time of day in a timespec. 851 * Returns the time of day in a timespec.
@@ -920,9 +920,9 @@ static int change_clocksource(void)
920 struct clocksource *new; 920 struct clocksource *new;
921 cycle_t now; 921 cycle_t now;
922 u64 nsec; 922 u64 nsec;
923 new = get_next_clocksource(); 923 new = clocksource_get_next();
924 if (clock != new) { 924 if (clock != new) {
925 now = read_clocksource(new); 925 now = clocksource_read(new);
926 nsec = __get_nsec_offset(); 926 nsec = __get_nsec_offset();
927 timespec_add_ns(&xtime, nsec); 927 timespec_add_ns(&xtime, nsec);
928 928
@@ -966,9 +966,9 @@ void __init timekeeping_init(void)
966 unsigned long flags; 966 unsigned long flags;
967 967
968 write_seqlock_irqsave(&xtime_lock, flags); 968 write_seqlock_irqsave(&xtime_lock, flags);
969 clock = get_next_clocksource(); 969 clock = clocksource_get_next();
970 calculate_clocksource_interval(clock, tick_nsec); 970 clocksource_calculate_interval(clock, tick_nsec);
971 last_clock_cycle = read_clocksource(clock); 971 last_clock_cycle = clocksource_read(clock);
972 ntp_clear(); 972 ntp_clear();
973 write_sequnlock_irqrestore(&xtime_lock, flags); 973 write_sequnlock_irqrestore(&xtime_lock, flags);
974} 974}
@@ -988,7 +988,7 @@ static int timekeeping_resume(struct sys_device *dev)
988 988
989 write_seqlock_irqsave(&xtime_lock, flags); 989 write_seqlock_irqsave(&xtime_lock, flags);
990 /* restart the last cycle value */ 990 /* restart the last cycle value */
991 last_clock_cycle = read_clocksource(clock); 991 last_clock_cycle = clocksource_read(clock);
992 write_sequnlock_irqrestore(&xtime_lock, flags); 992 write_sequnlock_irqrestore(&xtime_lock, flags);
993 return 0; 993 return 0;
994} 994}
@@ -1028,7 +1028,7 @@ static void update_wall_time(void)
1028 snsecs_per_sec = (s64)NSEC_PER_SEC << clock->shift; 1028 snsecs_per_sec = (s64)NSEC_PER_SEC << clock->shift;
1029 remainder_snsecs += (s64)xtime.tv_nsec << clock->shift; 1029 remainder_snsecs += (s64)xtime.tv_nsec << clock->shift;
1030 1030
1031 now = read_clocksource(clock); 1031 now = clocksource_read(clock);
1032 offset = (now - last_clock_cycle)&clock->mask; 1032 offset = (now - last_clock_cycle)&clock->mask;
1033 1033
1034 /* normally this loop will run just once, however in the 1034 /* normally this loop will run just once, however in the
@@ -1069,7 +1069,7 @@ static void update_wall_time(void)
1069 if (change_clocksource()) { 1069 if (change_clocksource()) {
1070 error = 0; 1070 error = 0;
1071 remainder_snsecs = 0; 1071 remainder_snsecs = 0;
1072 calculate_clocksource_interval(clock, tick_nsec); 1072 clocksource_calculate_interval(clock, tick_nsec);
1073 } 1073 }
1074} 1074}
1075 1075