Skip to content
This repository has been archived by the owner on Mar 17, 2019. It is now read-only.

Commit

Permalink
Revert "media: v4l2-compat: Revert non-upstream changes"
Browse files Browse the repository at this point in the history
Bring back CAF changes with context adjustments for -stable
commits. Adjust some indentation to use tabs in place of
mixed tabs and spaces.

This reverts commit 01f0955.

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Harsh Shandilya <harsh@prjkt.io>
  • Loading branch information
Harsh Shandilya committed Apr 8, 2018
1 parent a3fedb3 commit 195299c
Showing 1 changed file with 15 additions and 6 deletions.
21 changes: 15 additions & 6 deletions drivers/media/v4l2-core/v4l2-compat-ioctl32.c
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,13 @@ static int get_v4l2_plane32(struct v4l2_plane __user *up,
compat_ulong_t p;

if (copy_in_user(up, up32, 2 * sizeof(__u32)) ||
copy_in_user(&up->data_offset, &up32->data_offset,
sizeof(up->data_offset)))
return -EFAULT;
copy_in_user(&up->data_offset, &up32->data_offset,
sizeof(up->data_offset)) ||
copy_in_user(up->reserved, up32->reserved,
sizeof(up->reserved)) ||
copy_in_user(&up->length, &up32->length,
sizeof(__u32)))
return -EFAULT;

switch (memory) {
case V4L2_MEMORY_MMAP:
Expand Down Expand Up @@ -414,9 +418,11 @@ static int put_v4l2_plane32(struct v4l2_plane __user *up,
unsigned long p;

if (copy_in_user(up32, up, 2 * sizeof(__u32)) ||
copy_in_user(&up32->data_offset, &up->data_offset,
sizeof(up->data_offset)))
return -EFAULT;
copy_in_user(&up32->data_offset, &up->data_offset,
sizeof(up->data_offset)) ||
copy_in_user(up32->reserved, up->reserved,
sizeof(up32->reserved)))
return -EFAULT;

switch (memory) {
case V4L2_MEMORY_MMAP:
Expand Down Expand Up @@ -893,6 +899,9 @@ static int put_v4l2_ext_controls32(struct file *file,
struct v4l2_event32 {
__u32 type;
union {
struct v4l2_event_vsync vsync;
struct v4l2_event_ctrl ctrl;
struct v4l2_event_frame_sync frame_sync;
__u8 data[64];
} u;
__u32 pending;
Expand Down

0 comments on commit 195299c

Please sign in to comment.