diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2009-08-14 09:47:19 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2009-08-15 04:55:45 -0400 |
commit | a0f7d48bfb95a4c5172a2756dbc4b82afc8e9ae4 (patch) | |
tree | b82580eb76f99ee1352f399975050630ca21936a /include | |
parent | 31089c13bcb18d2cd2a3ddfbe3a28666346f237e (diff) |
timekeeping: Remove clocksource inline functions
The three inline functions clocksource_read, clocksource_enable and
clocksource_disable are simple wrappers of an indirect call plus the
copy from and to the mult_orig value. The functions are exclusively
used by the timekeeping code which has intimate knowledge of the
clocksource anyway. Therefore remove the inline functions. No
functional change.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Acked-by: John Stultz <johnstul@us.ibm.com>
Cc: Daniel Walker <dwalker@fifo99.com>
LKML-Reference: <20090814134807.903108946@de.ibm.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/clocksource.h | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index 1219be4fb42e..a1ef46f61c81 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -268,64 +268,6 @@ static inline u32 clocksource_hz2mult(u32 hz, u32 shift_constant) | |||
268 | } | 268 | } |
269 | 269 | ||
270 | /** | 270 | /** |
271 | * clocksource_read: - Access the clocksource's current cycle value | ||
272 | * @cs: pointer to clocksource being read | ||
273 | * | ||
274 | * Uses the clocksource to return the current cycle_t value | ||
275 | */ | ||
276 | static inline cycle_t clocksource_read(struct clocksource *cs) | ||
277 | { | ||
278 | return cs->read(cs); | ||
279 | } | ||
280 | |||
281 | /** | ||
282 | * clocksource_enable: - enable clocksource | ||
283 | * @cs: pointer to clocksource | ||
284 | * | ||
285 | * Enables the specified clocksource. The clocksource callback | ||
286 | * function should start up the hardware and setup mult and field | ||
287 | * members of struct clocksource to reflect hardware capabilities. | ||
288 | */ | ||
289 | static inline int clocksource_enable(struct clocksource *cs) | ||
290 | { | ||
291 | int ret = 0; | ||
292 | |||
293 | if (cs->enable) | ||
294 | ret = cs->enable(cs); | ||
295 | |||
296 | /* | ||
297 | * The frequency may have changed while the clocksource | ||
298 | * was disabled. If so the code in ->enable() must update | ||
299 | * the mult value to reflect the new frequency. Make sure | ||
300 | * mult_orig follows this change. | ||
301 | */ | ||
302 | cs->mult_orig = cs->mult; | ||
303 | |||
304 | return ret; | ||
305 | } | ||
306 | |||
307 | /** | ||
308 | * clocksource_disable: - disable clocksource | ||
309 | * @cs: pointer to clocksource | ||
310 | * | ||
311 | * Disables the specified clocksource. The clocksource callback | ||
312 | * function should power down the now unused hardware block to | ||
313 | * save power. | ||
314 | */ | ||
315 | static inline void clocksource_disable(struct clocksource *cs) | ||
316 | { | ||
317 | /* | ||
318 | * Save mult_orig in mult so clocksource_enable() can | ||
319 | * restore the value regardless if ->enable() updates | ||
320 | * the value of mult or not. | ||
321 | */ | ||
322 | cs->mult = cs->mult_orig; | ||
323 | |||
324 | if (cs->disable) | ||
325 | cs->disable(cs); | ||
326 | } | ||
327 | |||
328 | /** | ||
329 | * cyc2ns - converts clocksource cycles to nanoseconds | 271 | * cyc2ns - converts clocksource cycles to nanoseconds |
330 | * @cs: Pointer to clocksource | 272 | * @cs: Pointer to clocksource |
331 | * @cycles: Cycles | 273 | * @cycles: Cycles |