summaryrefslogtreecommitdiff
path: root/drivers/ptp/ptp_clock.c
diff options
context:
space:
mode:
authorRichard Cochran <richardcochran@gmail.com>2015-03-29 23:12:13 +0200
committerDavid S. Miller <davem@davemloft.net>2015-03-31 12:01:19 -0400
commited7c6317bc599502e1fdc7f5f95cb9a5550360a4 (patch)
tree7e9d6452f150edd63d2a6f911b355152f6d0fb60 /drivers/ptp/ptp_clock.c
parenta043a72909b9ed9b3505f3be42d5329cea50c273 (diff)
ptp: remove 32 bit get/set methods.
All of the PHC drivers have been converted to the new methods. This patch converts the three remaining callers within the core code and removes the older methods for good. As a result, the core PHC code is ready for the year 2038. However, some of the PHC drivers are not quite ready yet. Signed-off-by: Richard Cochran <richardcochran@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/ptp/ptp_clock.c')
-rw-r--r--drivers/ptp/ptp_clock.c15
1 files changed, 4 insertions, 11 deletions
diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
index df50d5eeae6f..2e481b9e8ea5 100644
--- a/drivers/ptp/ptp_clock.c
+++ b/drivers/ptp/ptp_clock.c
@@ -109,9 +109,7 @@ static int ptp_clock_settime(struct posix_clock *pc, const struct timespec *tp)
struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
struct timespec64 ts = timespec_to_timespec64(*tp);
- return ptp->info->settime64 ?
- ptp->info->settime64(ptp->info, &ts) :
- ptp->info->settime(ptp->info, tp);
+ return ptp->info->settime64(ptp->info, &ts);
}
static int ptp_clock_gettime(struct posix_clock *pc, struct timespec *tp)
@@ -120,14 +118,9 @@ static int ptp_clock_gettime(struct posix_clock *pc, struct timespec *tp)
struct timespec64 ts;
int err;
- if (ptp->info->gettime64) {
- err = ptp->info->gettime64(ptp->info, &ts);
- if (!err)
- *tp = timespec64_to_timespec(ts);
- } else {
- err = ptp->info->gettime(ptp->info, tp);
- }
-
+ err = ptp->info->gettime64(ptp->info, &ts);
+ if (!err)
+ *tp = timespec64_to_timespec(ts);
return err;
}