diff options
author | Kefeng Wang <wangkefeng.wang@huawei.com> | 2016-01-27 17:34:37 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-29 15:14:21 -0500 |
commit | 286af315d3f153595ce718fb1e442891f14ed5c0 (patch) | |
tree | 3bc06dd662be82c90daa9d3b927b742826b41125 /drivers/net/ethernet/cavium | |
parent | 63e51b6a24f1bee5363056b7aee3a468b12c546b (diff) | |
download | linux-286af315d3f153595ce718fb1e442891f14ed5c0.tar.bz2 |
net: cavium: liquidio: use helpers ns_to_timespec64()
Convert the driver to use ns_to_timespec64() to keep consistency
with timespec64_to_ns() instead of open coding the same logic.
Signed-off-by: Kefeng Wang <wangkefeng.wang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/cavium')
-rw-r--r-- | drivers/net/ethernet/cavium/liquidio/lio_main.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/net/ethernet/cavium/liquidio/lio_main.c b/drivers/net/ethernet/cavium/liquidio/lio_main.c index b89504405b72..872765527081 100644 --- a/drivers/net/ethernet/cavium/liquidio/lio_main.c +++ b/drivers/net/ethernet/cavium/liquidio/lio_main.c @@ -1526,7 +1526,6 @@ static int liquidio_ptp_gettime(struct ptp_clock_info *ptp, struct timespec64 *ts) { u64 ns; - u32 remainder; unsigned long flags; struct lio *lio = container_of(ptp, struct lio, ptp_info); struct octeon_device *oct = (struct octeon_device *)lio->oct_dev; @@ -1536,8 +1535,7 @@ static int liquidio_ptp_gettime(struct ptp_clock_info *ptp, ns += lio->ptp_adjust; spin_unlock_irqrestore(&lio->ptp_lock, flags); - ts->tv_sec = div_u64_rem(ns, 1000000000ULL, &remainder); - ts->tv_nsec = remainder; + *ts = ns_to_timespec64(ns); return 0; } |