mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
media: i2c: gc0312: fix flip and mirror register
Signed-off-by: Jianwei Fan <jianwei.fan@rock-chips.com> Change-Id: Ibc7ebf2de267022497808f61fb5719797ba3b789
This commit is contained in:
@@ -140,7 +140,7 @@ static const struct sensor_register gc0312_vga_regs[] = {
|
||||
{0x0f, 0x02},
|
||||
{0x10, 0x88},
|
||||
{0x16, 0x00},
|
||||
{0x17, 0x17},
|
||||
{0x17, 0x10},
|
||||
{0x18, 0x1a},
|
||||
{0x19, 0x14},
|
||||
{0x1b, 0x48},
|
||||
@@ -790,8 +790,11 @@ static long gc0312_compat_ioctl32(struct v4l2_subdev *sd,
|
||||
}
|
||||
|
||||
ret = gc0312_ioctl(sd, cmd, inf);
|
||||
if (!ret)
|
||||
if (!ret) {
|
||||
ret = copy_to_user(up, inf, sizeof(*inf));
|
||||
if (ret)
|
||||
ret = -EFAULT;
|
||||
}
|
||||
kfree(inf);
|
||||
break;
|
||||
case RKMODULE_AWB_CFG:
|
||||
@@ -804,12 +807,16 @@ static long gc0312_compat_ioctl32(struct v4l2_subdev *sd,
|
||||
ret = copy_from_user(cfg, up, sizeof(*cfg));
|
||||
if (!ret)
|
||||
ret = gc0312_ioctl(sd, cmd, cfg);
|
||||
else
|
||||
ret = -EFAULT;
|
||||
kfree(cfg);
|
||||
break;
|
||||
case RKMODULE_SET_QUICK_STREAM:
|
||||
ret = copy_from_user(&stream, up, sizeof(u32));
|
||||
if (!ret)
|
||||
ret = gc0312_ioctl(sd, cmd, &stream);
|
||||
else
|
||||
ret = -EFAULT;
|
||||
break;
|
||||
default:
|
||||
ret = -ENOIOCTLCMD;
|
||||
|
||||
Reference in New Issue
Block a user