|
@@ -158,13 +158,12 @@ static int i40e_ptp_adjfreq(struct ptp_clock_info *ptp, s32 ppb)
|
|
|
static int i40e_ptp_adjtime(struct ptp_clock_info *ptp, s64 delta)
|
|
|
{
|
|
|
struct i40e_pf *pf = container_of(ptp, struct i40e_pf, ptp_caps);
|
|
|
- struct timespec64 now, then;
|
|
|
+ struct timespec64 now;
|
|
|
|
|
|
- then = ns_to_timespec64(delta);
|
|
|
mutex_lock(&pf->tmreg_lock);
|
|
|
|
|
|
i40e_ptp_read(pf, &now);
|
|
|
- now = timespec64_add(now, then);
|
|
|
+ timespec64_add_ns(&now, delta);
|
|
|
i40e_ptp_write(pf, (const struct timespec64 *)&now);
|
|
|
|
|
|
mutex_unlock(&pf->tmreg_lock);
|