Commit 3f6c4654 authored by Richard Cochran's avatar Richard Cochran Committed by David S. Miller

ptp: stmmac: convert to the 64 bit get/set time methods.

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: default avatarRichard Cochran <richardcochran@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0fcb5c76
...@@ -105,7 +105,7 @@ static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta) ...@@ -105,7 +105,7 @@ static int stmmac_adjust_time(struct ptp_clock_info *ptp, s64 delta)
* Description: this function will read the current time from the * Description: this function will read the current time from the
* hardware clock and store it in @ts. * hardware clock and store it in @ts.
*/ */
static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec *ts) static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec64 *ts)
{ {
struct stmmac_priv *priv = struct stmmac_priv *priv =
container_of(ptp, struct stmmac_priv, ptp_clock_ops); container_of(ptp, struct stmmac_priv, ptp_clock_ops);
...@@ -135,7 +135,7 @@ static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec *ts) ...@@ -135,7 +135,7 @@ static int stmmac_get_time(struct ptp_clock_info *ptp, struct timespec *ts)
* hardware clock. * hardware clock.
*/ */
static int stmmac_set_time(struct ptp_clock_info *ptp, static int stmmac_set_time(struct ptp_clock_info *ptp,
const struct timespec *ts) const struct timespec64 *ts)
{ {
struct stmmac_priv *priv = struct stmmac_priv *priv =
container_of(ptp, struct stmmac_priv, ptp_clock_ops); container_of(ptp, struct stmmac_priv, ptp_clock_ops);
...@@ -168,8 +168,8 @@ static struct ptp_clock_info stmmac_ptp_clock_ops = { ...@@ -168,8 +168,8 @@ static struct ptp_clock_info stmmac_ptp_clock_ops = {
.pps = 0, .pps = 0,
.adjfreq = stmmac_adjust_freq, .adjfreq = stmmac_adjust_freq,
.adjtime = stmmac_adjust_time, .adjtime = stmmac_adjust_time,
.gettime = stmmac_get_time, .gettime64 = stmmac_get_time,
.settime = stmmac_set_time, .settime64 = stmmac_set_time,
.enable = stmmac_enable, .enable = stmmac_enable,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment