Commit 76369470b7e5f97fc1a8af83c45b9ff739b08cb6

Authored by Arjan van de Ven
1 parent beb20d52d0

hrtimer: convert timerfd to the new hrtimer apis

In order to be able to do range hrtimers we need to use accessor functions
to the "expire" member of the hrtimer struct.
This patch converts timerfd to these accessors.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>

Showing 1 changed file with 3 additions and 5 deletions Side-by-side Diff

... ... @@ -52,11 +52,9 @@
52 52  
53 53 static ktime_t timerfd_get_remaining(struct timerfd_ctx *ctx)
54 54 {
55   - ktime_t now, remaining;
  55 + ktime_t remaining;
56 56  
57   - now = ctx->tmr.base->get_time();
58   - remaining = ktime_sub(ctx->tmr.expires, now);
59   -
  57 + remaining = hrtimer_expires_remaining(&ctx->tmr);
60 58 return remaining.tv64 < 0 ? ktime_set(0, 0): remaining;
61 59 }
62 60  
... ... @@ -74,7 +72,7 @@
74 72 ctx->ticks = 0;
75 73 ctx->tintv = timespec_to_ktime(ktmr->it_interval);
76 74 hrtimer_init(&ctx->tmr, ctx->clockid, htmode);
77   - ctx->tmr.expires = texp;
  75 + hrtimer_set_expires(&ctx->tmr, texp);
78 76 ctx->tmr.function = timerfd_tmrproc;
79 77 if (texp.tv64 != 0)
80 78 hrtimer_start(&ctx->tmr, texp, htmode);