summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/ptp/ptp_clock.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index 67e628ee0365..c470ddf1a6fa 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -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;