lkml.org 
[lkml]   [2015]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC net-next 22/22] ptp: remove 32 bit get/set methods.
    On Sat, Mar 21, 2015 at 09:59:52PM +0100, Richard Cochran wrote:

    > diff --git a/drivers/ptp/ptp_clock.c b/drivers/ptp/ptp_clock.c
    > index 296b0ec..2665360 100644
    > --- a/drivers/ptp/ptp_clock.c
    > +++ b/drivers/ptp/ptp_clock.c
    > @@ -107,13 +107,21 @@ static int ptp_clock_getres(struct posix_clock *pc, struct timespec *tp)
    > static int ptp_clock_settime(struct posix_clock *pc, const struct timespec *tp)
    > {
    > struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
    > - return ptp->info->settime(ptp->info, tp);
    > + struct timespec64 ts = timespec_to_timespec64(*tp);
    > +
    > + return ptp->info->settime64(ptp->info, &ts);
    > }
    >
    > static int ptp_clock_gettime(struct posix_clock *pc, struct timespec *tp)
    > {
    > struct ptp_clock *ptp = container_of(pc, struct ptp_clock, clock);
    > - return ptp->info->gettime(ptp->info, tp);
    > + struct timespec64 ts;
    > + int err;
    > +
    > + err = ptp->info->gettime64(ptp->info, &ts);
    > + if (!err)
    > + *tp = timespec64_to_timespec(ts);
    > + return err;
    > }

    Oops, both of these functions should have started using the new
    methods *before* migrating the drivers. Will fix in V2.

    Thanks,
    Richard


    \
     
     \ /
      Last update: 2015-03-21 22:41    [W:2.973 / U:0.292 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site