Messages in this thread | | | Date | Sat, 1 May 2010 10:45:22 +0200 (CEST) | From | Thomas Gleixner <> | Subject | Re: [PATCH 1/3] Add clocksource_register_hz/khz interface |
| |
On Fri, 30 Apr 2010, John Stultz wrote: > +/** > + * clocksource_register - Used to install new clocksources > + * @t: clocksource to be registered
Can you fix the kernel doc please ?
> + * > + * Returns -EBUSY if registration fails, zero otherwise. > + */ > +int clocksource_register_hz(struct clocksource *cs, u32 hz) > +{ > + > + /* Ideally we want to use some of the limits used in > + * clocksource_max_deferment, to provide a more informed > + * MAX_UPDATE_LENGTH. But for now this just gets the > + * regiseter interface working properly. > + */ > + clocks_calc_mult_shift(&cs->mult, &cs->shift, hz, > + NSEC_PER_SEC, MAX_UPDATE_LENGTH); > + cs->max_idle_ns = clocksource_max_deferment(cs); > + > + mutex_lock(&clocksource_mutex); > + clocksource_enqueue(cs); > + clocksource_select(); > + clocksource_enqueue_watchdog(cs); > + mutex_unlock(&clocksource_mutex); > + return 0; > +} > +EXPORT_SYMBOL(clocksource_register_hz);
EXPORT_SYMBOL_GPL please
> + > +/** > + * clocksource_register - Used to install new clocksources > + * @t: clocksource to be registered > + * > + * Returns -EBUSY if registration fails, zero otherwise. > + */ > +int clocksource_register_khz(struct clocksource *cs, u32 khz) > +{
shouldn't that be a simple inline wrapper which does
return clocksource_register_hz(cs, khz * 1000);
Thanks,
tglx
| |