mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-17 09:43:59 +08:00
ptp: provide the clock's adjusted frequency
If the timex.mode field indicates a query, then we provide the value of the current frequency adjustment. [ Get rid of extraneous empty lines -DaveM ] Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
39a8cbd9ca
commit
5c35bad5ff
@ -143,11 +143,12 @@ static int ptp_clock_adjtime(struct posix_clock *pc, struct timex *tx)
|
||||
kt = timespec_to_ktime(ts);
|
||||
delta = ktime_to_ns(kt);
|
||||
err = ops->adjtime(ops, delta);
|
||||
|
||||
} else if (tx->modes & ADJ_FREQUENCY) {
|
||||
|
||||
err = ops->adjfreq(ops, scaled_ppm_to_ppb(tx->freq));
|
||||
ptp->dialed_frequency = tx->freq;
|
||||
} else if (tx->modes == 0) {
|
||||
tx->freq = ptp->dialed_frequency;
|
||||
err = 0;
|
||||
}
|
||||
|
||||
return err;
|
||||
|
Loading…
Reference in New Issue
Block a user