aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/clocksource.h
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-04-21 15:24:00 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2009-04-21 16:41:47 -0400
commit8e19608e8b5c001e4a66ce482edc474f05fb7355 (patch)
tree06af4be339136da7476396604c30112238d84339 /include/linux/clocksource.h
parentff14ed5db6e7e5e5dc23712d3c877891d4d9a1a8 (diff)
clocksource: pass clocksource to read() callback
Pass clocksource pointer to the read() callback for clocksources. This allows us to share the callback between multiple instances. [hugh@veritas.com: fix powerpc build of clocksource pass clocksource mods] [akpm@linux-foundation.org: cleanup] Signed-off-by: Magnus Damm <damm@igel.co.jp> Acked-by: John Stultz <johnstul@us.ibm.com> Cc: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Hugh Dickins <hugh@veritas.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/clocksource.h')
-rw-r--r--include/linux/clocksource.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h
index 573819ef4cc0..0d96cde9ee5d 100644
--- a/include/linux/clocksource.h
+++ b/include/linux/clocksource.h
@@ -143,7 +143,7 @@ extern u64 timecounter_cyc2time(struct timecounter *tc,
143 * 400-499: Perfect 143 * 400-499: Perfect
144 * The ideal clocksource. A must-use where 144 * The ideal clocksource. A must-use where
145 * available. 145 * available.
146 * @read: returns a cycle value 146 * @read: returns a cycle value, passes clocksource as argument
147 * @mask: bitmask for two's complement 147 * @mask: bitmask for two's complement
148 * subtraction of non 64 bit counters 148 * subtraction of non 64 bit counters
149 * @mult: cycle to nanosecond multiplier (adjusted by NTP) 149 * @mult: cycle to nanosecond multiplier (adjusted by NTP)
@@ -162,7 +162,7 @@ struct clocksource {
162 char *name; 162 char *name;
163 struct list_head list; 163 struct list_head list;
164 int rating; 164 int rating;
165 cycle_t (*read)(void); 165 cycle_t (*read)(struct clocksource *cs);
166 cycle_t mask; 166 cycle_t mask;
167 u32 mult; 167 u32 mult;
168 u32 mult_orig; 168 u32 mult_orig;
@@ -271,7 +271,7 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant)
271 */ 271 */
272static inline cycle_t clocksource_read(struct clocksource *cs) 272static inline cycle_t clocksource_read(struct clocksource *cs)
273{ 273{
274 return cs->read(); 274 return cs->read(cs);
275} 275}
276 276
277/** 277/**