aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/video/tcm825x.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-07-21 11:02:45 +0200
committerIngo Molnar <mingo@elte.hu>2008-07-21 11:02:45 +0200
commite27772b48df91a954a74b1411b57d83b945a58c7 (patch)
treeebd4a434d9e3cbd0844109e4469f91daac581b59 /drivers/media/video/tcm825x.c
parentd092633bff3b19faffc480fe9810805e7792a029 (diff)
parent14b395e35d1afdd8019d11b92e28041fad591b71 (diff)
Merge branch 'linus' into x86/urgent
Diffstat (limited to 'drivers/media/video/tcm825x.c')
-rw-r--r--drivers/media/video/tcm825x.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/media/video/tcm825x.c b/drivers/media/video/tcm825x.c
index 8f0100f67a9..29991d1cf13 100644
--- a/drivers/media/video/tcm825x.c
+++ b/drivers/media/video/tcm825x.c
@@ -523,6 +523,9 @@ static int ioctl_g_ctrl(struct v4l2_int_device *s,
if (val < 0)
return val;
+ if (vc->id == V4L2_CID_HFLIP || vc->id == V4L2_CID_VFLIP)
+ val ^= sensor->platform_data->is_upside_down();
+
vc->value = val;
return 0;
}
@@ -556,6 +559,9 @@ static int ioctl_s_ctrl(struct v4l2_int_device *s,
if (lvc == NULL)
return -EINVAL;
+ if (vc->id == V4L2_CID_HFLIP || vc->id == V4L2_CID_VFLIP)
+ val ^= sensor->platform_data->is_upside_down();
+
val = val << lvc->start_bit;
if (tcm825x_write_reg_mask(client, lvc->reg, val))
return -EIO;