This device stores the number of seconds in a 32 bit register. So more work is needed on this driver before the year 2038 comes around.
Compile tested only. Signed-off-by: Richard Cochran <richardcoch...@gmail.com> --- drivers/net/phy/dp83640.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/net/phy/dp83640.c b/drivers/net/phy/dp83640.c index e22e602..1a88235 100644 --- a/drivers/net/phy/dp83640.c +++ b/drivers/net/phy/dp83640.c @@ -427,7 +427,8 @@ static int ptp_dp83640_adjtime(struct ptp_clock_info *ptp, s64 delta) return err; } -static int ptp_dp83640_gettime(struct ptp_clock_info *ptp, struct timespec *ts) +static int ptp_dp83640_gettime(struct ptp_clock_info *ptp, + struct timespec64 *ts) { struct dp83640_clock *clock = container_of(ptp, struct dp83640_clock, caps); @@ -452,16 +453,17 @@ static int ptp_dp83640_gettime(struct ptp_clock_info *ptp, struct timespec *ts) } static int ptp_dp83640_settime(struct ptp_clock_info *ptp, - const struct timespec *ts) + const struct timespec64 *ts64) { struct dp83640_clock *clock = container_of(ptp, struct dp83640_clock, caps); struct phy_device *phydev = clock->chosen->phydev; + struct timespec ts = timespec64_to_timespec(*ts64); int err; mutex_lock(&clock->extreg_lock); - err = tdr_write(1, phydev, ts, PTP_LOAD_CLK); + err = tdr_write(1, phydev, &ts, PTP_LOAD_CLK); mutex_unlock(&clock->extreg_lock); @@ -998,8 +1000,8 @@ static void dp83640_clock_init(struct dp83640_clock *clock, struct mii_bus *bus) clock->caps.pps = 0; clock->caps.adjfreq = ptp_dp83640_adjfreq; clock->caps.adjtime = ptp_dp83640_adjtime; - clock->caps.gettime = ptp_dp83640_gettime; - clock->caps.settime = ptp_dp83640_settime; + clock->caps.gettime64 = ptp_dp83640_gettime; + clock->caps.settime64 = ptp_dp83640_settime; clock->caps.enable = ptp_dp83640_enable; clock->caps.verify = ptp_dp83640_verify; /* -- 1.7.10.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/