struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
struct ptp_clock_info *ops = ptp->info;
struct ptp_clock_time *pct;
- struct timespec ts;
+ struct timespec64 ts;
+ struct timespec t2;
int enable, err = 0;
unsigned int i, pin_index;
}
pct = &sysoff->ts[0];
for (i = 0; i < sysoff->n_samples; i++) {
- getnstimeofday(&ts);
+ getnstimeofday64(&ts);
pct->sec = ts.tv_sec;
pct->nsec = ts.tv_nsec;
pct++;
- ptp->info->gettime(ptp->info, &ts);
+ if (ptp->info->gettime64) {
+ ptp->info->gettime64(ptp->info, &ts);
+ } else {
+ ptp->info->gettime(ptp->info, &t2);
+ ts = timespec_to_timespec64(t2);
+ }
pct->sec = ts.tv_sec;
pct->nsec = ts.tv_nsec;
pct++;
}
- getnstimeofday(&ts);
+ getnstimeofday64(&ts);
pct->sec = ts.tv_sec;
pct->nsec = ts.tv_nsec;
if (copy_to_user((void __user *)arg, sysoff, sizeof(*sysoff)))