Lines Matching full:cd

218 static int get_clock_desc(const clockid_t id, struct posix_clock_desc *cd)  in get_clock_desc()  argument
229 cd->fp = fp; in get_clock_desc()
230 cd->clk = get_posix_clock(fp); in get_clock_desc()
232 err = cd->clk ? 0 : -ENODEV; in get_clock_desc()
239 static void put_clock_desc(struct posix_clock_desc *cd) in put_clock_desc() argument
241 put_posix_clock(cd->clk); in put_clock_desc()
242 fput(cd->fp); in put_clock_desc()
247 struct posix_clock_desc cd; in pc_clock_adjtime() local
250 err = get_clock_desc(id, &cd); in pc_clock_adjtime()
254 if ((cd.fp->f_mode & FMODE_WRITE) == 0) { in pc_clock_adjtime()
259 if (cd.clk->ops.clock_adjtime) in pc_clock_adjtime()
260 err = cd.clk->ops.clock_adjtime(cd.clk, tx); in pc_clock_adjtime()
264 put_clock_desc(&cd); in pc_clock_adjtime()
271 struct posix_clock_desc cd; in pc_clock_gettime() local
274 err = get_clock_desc(id, &cd); in pc_clock_gettime()
278 if (cd.clk->ops.clock_gettime) in pc_clock_gettime()
279 err = cd.clk->ops.clock_gettime(cd.clk, ts); in pc_clock_gettime()
283 put_clock_desc(&cd); in pc_clock_gettime()
290 struct posix_clock_desc cd; in pc_clock_getres() local
293 err = get_clock_desc(id, &cd); in pc_clock_getres()
297 if (cd.clk->ops.clock_getres) in pc_clock_getres()
298 err = cd.clk->ops.clock_getres(cd.clk, ts); in pc_clock_getres()
302 put_clock_desc(&cd); in pc_clock_getres()
309 struct posix_clock_desc cd; in pc_clock_settime() local
315 err = get_clock_desc(id, &cd); in pc_clock_settime()
319 if ((cd.fp->f_mode & FMODE_WRITE) == 0) { in pc_clock_settime()
324 if (cd.clk->ops.clock_settime) in pc_clock_settime()
325 err = cd.clk->ops.clock_settime(cd.clk, ts); in pc_clock_settime()
329 put_clock_desc(&cd); in pc_clock_settime()