clockadj: remove useless clockid parameter.

The clockid parameter to the function to get the system clock's maximum
adjustment is redundant, so let us just remove it.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2013-04-05 09:47:21 +02:00
parent 4a6ef24fef
commit 1f2c9de982
3 changed files with 7 additions and 6 deletions

View File

@ -592,7 +592,7 @@ struct clock *clock_create(int phc_index, struct interface *iface, int count,
} else { } else {
c->clkid = CLOCK_REALTIME; c->clkid = CLOCK_REALTIME;
c->utc_timescale = 1; c->utc_timescale = 1;
max_adj = clockadj_get_max_freq(c->clkid); max_adj = sysclk_max_freq();
clockadj_set_leap(c->clkid, 0); clockadj_set_leap(c->clkid, 0);
} }
c->leap_set = 0; c->leap_set = 0;

View File

@ -95,8 +95,9 @@ void clockadj_set_leap(clockid_t clkid, int leap)
pr_notice(m); pr_notice(m);
} }
int clockadj_get_max_freq(clockid_t clkid) int sysclk_max_freq(void)
{ {
clockid_t clkid = CLOCK_REALTIME;
int f = 0; int f = 0;
struct timex tx; struct timex tx;
memset(&tx, 0, sizeof(tx)); memset(&tx, 0, sizeof(tx));

View File

@ -53,9 +53,9 @@ void clockadj_step(clockid_t clkid, int64_t step);
void clockadj_set_leap(clockid_t clkid, int leap); void clockadj_set_leap(clockid_t clkid, int leap);
/** /**
* Read clock's maximum frequency adjustment. * Read maximum frequency adjustment of the system clock (CLOCK_REALTIME).
* @param clkid CLOCK_REALTIME. * @return The maximum frequency adjustment in parts per billion (ppb).
* @return The maximum frequency adjustment in parts per billion (ppb).
*/ */
int clockadj_get_max_freq(clockid_t clkid); int sysclk_max_freq(void);
#endif #endif