diff --git a/clock.c b/clock.c index 1ba30ee..dedf8e0 100644 --- a/clock.c +++ b/clock.c @@ -592,7 +592,7 @@ struct clock *clock_create(int phc_index, struct interface *iface, int count, } else { c->clkid = CLOCK_REALTIME; c->utc_timescale = 1; - max_adj = clockadj_get_max_freq(c->clkid); + max_adj = sysclk_max_freq(); clockadj_set_leap(c->clkid, 0); } c->leap_set = 0; diff --git a/clockadj.c b/clockadj.c index 7587dda..870ee61 100644 --- a/clockadj.c +++ b/clockadj.c @@ -95,8 +95,9 @@ void clockadj_set_leap(clockid_t clkid, int leap) pr_notice(m); } -int clockadj_get_max_freq(clockid_t clkid) +int sysclk_max_freq(void) { + clockid_t clkid = CLOCK_REALTIME; int f = 0; struct timex tx; memset(&tx, 0, sizeof(tx)); diff --git a/clockadj.h b/clockadj.h index 5b91d40..d9a8a65 100644 --- a/clockadj.h +++ b/clockadj.h @@ -53,9 +53,9 @@ void clockadj_step(clockid_t clkid, int64_t step); void clockadj_set_leap(clockid_t clkid, int leap); /** - * Read clock's maximum frequency adjustment. - * @param clkid CLOCK_REALTIME. - * @return The maximum frequency adjustment in parts per billion (ppb). + * Read maximum frequency adjustment of the system clock (CLOCK_REALTIME). + * @return The maximum frequency adjustment in parts per billion (ppb). */ -int clockadj_get_max_freq(clockid_t clkid); +int sysclk_max_freq(void); + #endif