lkml.org 
[lkml]   [2010]   [May]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [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


    \
     
     \ /
      Last update: 2010-05-01 10:49    [W:4.120 / U:1.284 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site