• Home
  • Raw
  • Download

Lines Matching refs:kp

35 static int get_video_tuner32(struct video_tuner *kp, struct video_tuner32 __user *up)  in get_video_tuner32()  argument
38 get_user(kp->tuner, &up->tuner) || in get_video_tuner32()
39 copy_from_user(kp->name, up->name, 32) || in get_video_tuner32()
40 get_user(kp->rangelow, &up->rangelow) || in get_video_tuner32()
41 get_user(kp->rangehigh, &up->rangehigh) || in get_video_tuner32()
42 get_user(kp->flags, &up->flags) || in get_video_tuner32()
43 get_user(kp->mode, &up->mode) || in get_video_tuner32()
44 get_user(kp->signal, &up->signal)) in get_video_tuner32()
49 static int put_video_tuner32(struct video_tuner *kp, struct video_tuner32 __user *up) in put_video_tuner32() argument
52 put_user(kp->tuner, &up->tuner) || in put_video_tuner32()
53 copy_to_user(up->name, kp->name, 32) || in put_video_tuner32()
54 put_user(kp->rangelow, &up->rangelow) || in put_video_tuner32()
55 put_user(kp->rangehigh, &up->rangehigh) || in put_video_tuner32()
56 put_user(kp->flags, &up->flags) || in put_video_tuner32()
57 put_user(kp->mode, &up->mode) || in put_video_tuner32()
58 put_user(kp->signal, &up->signal)) in put_video_tuner32()
68 static int get_video_buffer32(struct video_buffer *kp, struct video_buffer32 __user *up) in get_video_buffer32() argument
74 get_user(kp->height, &up->height) || in get_video_buffer32()
75 get_user(kp->width, &up->width) || in get_video_buffer32()
76 get_user(kp->depth, &up->depth) || in get_video_buffer32()
77 get_user(kp->bytesperline, &up->bytesperline)) in get_video_buffer32()
83 kp->base = (void *)(unsigned long) tmp; in get_video_buffer32()
88 static int put_video_buffer32(struct video_buffer *kp, struct video_buffer32 __user *up) in put_video_buffer32() argument
90 u32 tmp = (u32)((unsigned long)kp->base); in put_video_buffer32()
94 put_user(kp->height, &up->height) || in put_video_buffer32()
95 put_user(kp->width, &up->width) || in put_video_buffer32()
96 put_user(kp->depth, &up->depth) || in put_video_buffer32()
97 put_user(kp->bytesperline, &up->bytesperline)) in put_video_buffer32()
113 static int get_video_window32(struct video_window *kp, struct video_window32 __user *up) in get_video_window32() argument
127 get_user(kp->x, &up->x) || in get_video_window32()
128 get_user(kp->y, &up->y) || in get_video_window32()
129 get_user(kp->width, &up->width) || in get_video_window32()
130 get_user(kp->height, &up->height) || in get_video_window32()
131 get_user(kp->chromakey, &up->chromakey) || in get_video_window32()
132 get_user(kp->flags, &up->flags) || in get_video_window32()
133 get_user(kp->clipcount, &up->clipcount)) in get_video_window32()
136 nclips = kp->clipcount; in get_video_window32()
137 kp->clips = NULL; in get_video_window32()
150 kp->clips = compat_alloc_user_space(VIDEO_CLIPMAP_SIZE); in get_video_window32()
151 if (copy_in_user(kp->clips, uclips, VIDEO_CLIPMAP_SIZE)) in get_video_window32()
160 kp->clips = compat_alloc_user_space(nclips * sizeof(struct video_clip)); in get_video_window32()
161 kclips = kp->clips; in get_video_window32()
179 static int put_video_window32(struct video_window *kp, struct video_window32 __user *up) in put_video_window32() argument
182 put_user(kp->x, &up->x) || in put_video_window32()
183 put_user(kp->y, &up->y) || in put_video_window32()
184 put_user(kp->width, &up->width) || in put_video_window32()
185 put_user(kp->height, &up->height) || in put_video_window32()
186 put_user(kp->chromakey, &up->chromakey) || in put_video_window32()
187 put_user(kp->flags, &up->flags) || in put_video_window32()
188 put_user(kp->clipcount, &up->clipcount)) in put_video_window32()
199 static int get_microcode32(struct video_code *kp, struct video_code32 __user *up) in get_microcode32() argument
202 copy_from_user(kp->loadwhat, up->loadwhat, sizeof(up->loadwhat)) || in get_microcode32()
203 get_user(kp->datasize, &up->datasize) || in get_microcode32()
204 copy_from_user(kp->data, up->data, up->datasize)) in get_microcode32()
255 static int get_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up) in get_v4l2_window32() argument
258 copy_from_user(&kp->w, &up->w, sizeof(up->w)) || in get_v4l2_window32()
259 get_user(kp->field, &up->field) || in get_v4l2_window32()
260 get_user(kp->chromakey, &up->chromakey) || in get_v4l2_window32()
261 get_user(kp->clipcount, &up->clipcount)) in get_v4l2_window32()
263 if (kp->clipcount > 2048) in get_v4l2_window32()
265 if (kp->clipcount) { in get_v4l2_window32()
268 int n = kp->clipcount; in get_v4l2_window32()
275 kp->clips = kclips; in get_v4l2_window32()
285 kp->clips = NULL; in get_v4l2_window32()
289 static int put_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up) in put_v4l2_window32() argument
291 if (copy_to_user(&up->w, &kp->w, sizeof(up->w)) || in put_v4l2_window32()
292 put_user(kp->field, &up->field) || in put_v4l2_window32()
293 put_user(kp->chromakey, &up->chromakey) || in put_v4l2_window32()
294 put_user(kp->clipcount, &up->clipcount)) in put_v4l2_window32()
299 static inline int get_v4l2_pix_format(struct v4l2_pix_format *kp, struct v4l2_pix_format __user *up) in get_v4l2_pix_format() argument
301 if (copy_from_user(kp, up, sizeof(struct v4l2_pix_format))) in get_v4l2_pix_format()
306 static inline int put_v4l2_pix_format(struct v4l2_pix_format *kp, struct v4l2_pix_format __user *up) in put_v4l2_pix_format() argument
308 if (copy_to_user(up, kp, sizeof(struct v4l2_pix_format))) in put_v4l2_pix_format()
313 static inline int get_v4l2_vbi_format(struct v4l2_vbi_format *kp, struct v4l2_vbi_format __user *up) in get_v4l2_vbi_format() argument
315 if (copy_from_user(kp, up, sizeof(struct v4l2_vbi_format))) in get_v4l2_vbi_format()
320 static inline int put_v4l2_vbi_format(struct v4l2_vbi_format *kp, struct v4l2_vbi_format __user *up) in put_v4l2_vbi_format() argument
322 if (copy_to_user(up, kp, sizeof(struct v4l2_vbi_format))) in put_v4l2_vbi_format()
327 static inline int get_v4l2_sliced_vbi_format(struct v4l2_sliced_vbi_format *kp, struct v4l2_sliced_… in get_v4l2_sliced_vbi_format() argument
329 if (copy_from_user(kp, up, sizeof(struct v4l2_sliced_vbi_format))) in get_v4l2_sliced_vbi_format()
334 static inline int put_v4l2_sliced_vbi_format(struct v4l2_sliced_vbi_format *kp, struct v4l2_sliced_… in put_v4l2_sliced_vbi_format() argument
336 if (copy_to_user(up, kp, sizeof(struct v4l2_sliced_vbi_format))) in put_v4l2_sliced_vbi_format()
352 static int get_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up) in get_v4l2_format32() argument
355 get_user(kp->type, &up->type)) in get_v4l2_format32()
357 switch (kp->type) { in get_v4l2_format32()
360 return get_v4l2_pix_format(&kp->fmt.pix, &up->fmt.pix); in get_v4l2_format32()
363 return get_v4l2_window32(&kp->fmt.win, &up->fmt.win); in get_v4l2_format32()
366 return get_v4l2_vbi_format(&kp->fmt.vbi, &up->fmt.vbi); in get_v4l2_format32()
369 return get_v4l2_sliced_vbi_format(&kp->fmt.sliced, &up->fmt.sliced); in get_v4l2_format32()
371 if (copy_from_user(kp, up, sizeof(kp->fmt.raw_data))) in get_v4l2_format32()
378 kp->type); in get_v4l2_format32()
383 static int put_v4l2_format32(struct v4l2_format *kp, struct v4l2_format32 __user *up) in put_v4l2_format32() argument
386 put_user(kp->type, &up->type)) in put_v4l2_format32()
388 switch (kp->type) { in put_v4l2_format32()
391 return put_v4l2_pix_format(&kp->fmt.pix, &up->fmt.pix); in put_v4l2_format32()
394 return put_v4l2_window32(&kp->fmt.win, &up->fmt.win); in put_v4l2_format32()
397 return put_v4l2_vbi_format(&kp->fmt.vbi, &up->fmt.vbi); in put_v4l2_format32()
400 return put_v4l2_sliced_vbi_format(&kp->fmt.sliced, &up->fmt.sliced); in put_v4l2_format32()
402 if (copy_to_user(up, kp, sizeof(up->fmt.raw_data))) in put_v4l2_format32()
409 kp->type); in put_v4l2_format32()
423 static int get_v4l2_standard32(struct v4l2_standard *kp, struct v4l2_standard32 __user *up) in get_v4l2_standard32() argument
427 get_user(kp->index, &up->index)) in get_v4l2_standard32()
432 static int put_v4l2_standard32(struct v4l2_standard *kp, struct v4l2_standard32 __user *up) in put_v4l2_standard32() argument
435 put_user(kp->index, &up->index) || in put_v4l2_standard32()
436 copy_to_user(up->id, &kp->id, sizeof(__u64)) || in put_v4l2_standard32()
437 copy_to_user(up->name, kp->name, 24) || in put_v4l2_standard32()
438 copy_to_user(&up->frameperiod, &kp->frameperiod, sizeof(kp->frameperiod)) || in put_v4l2_standard32()
439 put_user(kp->framelines, &up->framelines) || in put_v4l2_standard32()
440 copy_to_user(up->reserved, kp->reserved, 4 * sizeof(__u32))) in put_v4l2_standard32()
466 static int get_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user *up) in get_v4l2_buffer32() argument
470 get_user(kp->index, &up->index) || in get_v4l2_buffer32()
471 get_user(kp->type, &up->type) || in get_v4l2_buffer32()
472 get_user(kp->flags, &up->flags) || in get_v4l2_buffer32()
473 get_user(kp->memory, &up->memory) || in get_v4l2_buffer32()
474 get_user(kp->input, &up->input)) in get_v4l2_buffer32()
476 switch (kp->memory) { in get_v4l2_buffer32()
483 if (get_user(kp->length, &up->length) || in get_v4l2_buffer32()
487 kp->m.userptr = (unsigned long)compat_ptr(tmp); in get_v4l2_buffer32()
491 if (get_user(kp->m.offset, &up->m.offset)) in get_v4l2_buffer32()
498 static int put_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user *up) in put_v4l2_buffer32() argument
501 put_user(kp->index, &up->index) || in put_v4l2_buffer32()
502 put_user(kp->type, &up->type) || in put_v4l2_buffer32()
503 put_user(kp->flags, &up->flags) || in put_v4l2_buffer32()
504 put_user(kp->memory, &up->memory) || in put_v4l2_buffer32()
505 put_user(kp->input, &up->input)) in put_v4l2_buffer32()
507 switch (kp->memory) { in put_v4l2_buffer32()
509 if (put_user(kp->length, &up->length) || in put_v4l2_buffer32()
510 put_user(kp->m.offset, &up->m.offset)) in put_v4l2_buffer32()
514 if (put_user(kp->length, &up->length) || in put_v4l2_buffer32()
515 put_user(kp->m.userptr, &up->m.userptr)) in put_v4l2_buffer32()
519 if (put_user(kp->m.offset, &up->m.offset)) in put_v4l2_buffer32()
523 if (put_user(kp->bytesused, &up->bytesused) || in put_v4l2_buffer32()
524 put_user(kp->field, &up->field) || in put_v4l2_buffer32()
525 put_user(kp->timestamp.tv_sec, &up->timestamp.tv_sec) || in put_v4l2_buffer32()
526 put_user(kp->timestamp.tv_usec, &up->timestamp.tv_usec) || in put_v4l2_buffer32()
527 copy_to_user(&up->timecode, &kp->timecode, sizeof(struct v4l2_timecode)) || in put_v4l2_buffer32()
528 put_user(kp->sequence, &up->sequence) || in put_v4l2_buffer32()
529 put_user(kp->reserved, &up->reserved)) in put_v4l2_buffer32()
541 static int get_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_framebuffer32 __user *up) in get_v4l2_framebuffer32() argument
547 get_user(kp->capability, &up->capability) || in get_v4l2_framebuffer32()
548 get_user(kp->flags, &up->flags)) in get_v4l2_framebuffer32()
550 kp->base = compat_ptr(tmp); in get_v4l2_framebuffer32()
551 get_v4l2_pix_format(&kp->fmt, &up->fmt); in get_v4l2_framebuffer32()
555 static int put_v4l2_framebuffer32(struct v4l2_framebuffer *kp, struct v4l2_framebuffer32 __user *up) in put_v4l2_framebuffer32() argument
557 u32 tmp = (u32)((unsigned long)kp->base); in put_v4l2_framebuffer32()
561 put_user(kp->capability, &up->capability) || in put_v4l2_framebuffer32()
562 put_user(kp->flags, &up->flags)) in put_v4l2_framebuffer32()
564 put_v4l2_pix_format(&kp->fmt, &up->fmt); in put_v4l2_framebuffer32()
581 static inline int get_v4l2_input32(struct v4l2_input *kp, struct v4l2_input32 __user *up) in get_v4l2_input32() argument
583 if (copy_from_user(kp, up, sizeof(struct v4l2_input32))) in get_v4l2_input32()
588 static inline int put_v4l2_input32(struct v4l2_input *kp, struct v4l2_input32 __user *up) in put_v4l2_input32() argument
590 if (copy_to_user(up, kp, sizeof(struct v4l2_input32))) in put_v4l2_input32()
603 static int get_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext_controls32 __user … in get_v4l2_ext_controls32() argument
611 get_user(kp->ctrl_class, &up->ctrl_class) || in get_v4l2_ext_controls32()
612 get_user(kp->count, &up->count) || in get_v4l2_ext_controls32()
613 get_user(kp->error_idx, &up->error_idx) || in get_v4l2_ext_controls32()
614 copy_from_user(kp->reserved, up->reserved, sizeof(kp->reserved))) in get_v4l2_ext_controls32()
616 n = kp->count; in get_v4l2_ext_controls32()
618 kp->controls = NULL; in get_v4l2_ext_controls32()
627 kp->controls = kcontrols; in get_v4l2_ext_controls32()
644 static int put_v4l2_ext_controls32(struct v4l2_ext_controls *kp, struct v4l2_ext_controls32 __user … in put_v4l2_ext_controls32() argument
647 struct v4l2_ext_control __user *kcontrols = kp->controls; in put_v4l2_ext_controls32()
648 int n = kp->count; in put_v4l2_ext_controls32()
652 put_user(kp->ctrl_class, &up->ctrl_class) || in put_v4l2_ext_controls32()
653 put_user(kp->count, &up->count) || in put_v4l2_ext_controls32()
654 put_user(kp->error_idx, &up->error_idx) || in put_v4l2_ext_controls32()
655 copy_to_user(up->reserved, kp->reserved, sizeof(up->reserved))) in put_v4l2_ext_controls32()
657 if (!kp->count) in put_v4l2_ext_controls32()