• Home
  • Raw
  • Download

Lines Matching refs:cd

199 static int get_clock_desc(const clockid_t id, struct posix_clock_desc *cd)  in get_clock_desc()  argument
210 cd->fp = fp; in get_clock_desc()
211 cd->clk = get_posix_clock(fp); in get_clock_desc()
213 err = cd->clk ? 0 : -ENODEV; in get_clock_desc()
220 static void put_clock_desc(struct posix_clock_desc *cd) in put_clock_desc() argument
222 put_posix_clock(cd->clk); in put_clock_desc()
223 fput(cd->fp); in put_clock_desc()
228 struct posix_clock_desc cd; in pc_clock_adjtime() local
231 err = get_clock_desc(id, &cd); in pc_clock_adjtime()
235 if ((cd.fp->f_mode & FMODE_WRITE) == 0) { in pc_clock_adjtime()
240 if (cd.clk->ops.clock_adjtime) in pc_clock_adjtime()
241 err = cd.clk->ops.clock_adjtime(cd.clk, tx); in pc_clock_adjtime()
245 put_clock_desc(&cd); in pc_clock_adjtime()
252 struct posix_clock_desc cd; in pc_clock_gettime() local
255 err = get_clock_desc(id, &cd); in pc_clock_gettime()
259 if (cd.clk->ops.clock_gettime) in pc_clock_gettime()
260 err = cd.clk->ops.clock_gettime(cd.clk, ts); in pc_clock_gettime()
264 put_clock_desc(&cd); in pc_clock_gettime()
271 struct posix_clock_desc cd; in pc_clock_getres() local
274 err = get_clock_desc(id, &cd); in pc_clock_getres()
278 if (cd.clk->ops.clock_getres) in pc_clock_getres()
279 err = cd.clk->ops.clock_getres(cd.clk, ts); in pc_clock_getres()
283 put_clock_desc(&cd); in pc_clock_getres()
290 struct posix_clock_desc cd; in pc_clock_settime() local
293 err = get_clock_desc(id, &cd); in pc_clock_settime()
297 if ((cd.fp->f_mode & FMODE_WRITE) == 0) { in pc_clock_settime()
302 if (cd.clk->ops.clock_settime) in pc_clock_settime()
303 err = cd.clk->ops.clock_settime(cd.clk, ts); in pc_clock_settime()
307 put_clock_desc(&cd); in pc_clock_settime()