aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2008-12-22 06:20:32 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 09:39:22 -0200
commitb6070f0756fe1bccda1c8c67a6bfdfa51022b664 (patch)
treed2aa714fcff17fd2fdffe2cfae1f51d59a725a4a
parent5db0b5e1adff92dac54f2dfb1846a42501c8f7d9 (diff)
V4L/DVB (9931): em28xx: de-obfuscate vidioc_g_ctrl logic
vidioc_g_ctrl() were using an uneeded confusing logic. Instead, use the direct approach. Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/video/em28xx/em28xx-video.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/drivers/media/video/em28xx/em28xx-video.c b/drivers/media/video/em28xx/em28xx-video.c
index fc41eead640..4701b6589b1 100644
--- a/drivers/media/video/em28xx/em28xx-video.c
+++ b/drivers/media/video/em28xx/em28xx-video.c
@@ -1057,18 +1057,14 @@ static int vidioc_g_ctrl(struct file *file, void *priv,
rc = check_dev(dev);
if (rc < 0)
return rc;
+ rc = 0;
mutex_lock(&dev->lock);
- if (!dev->board.has_msp34xx)
- rc = em28xx_get_ctrl(dev, ctrl);
- else
- rc = -EINVAL;
-
- if (rc == -EINVAL) {
+ if (dev->board.has_msp34xx)
em28xx_i2c_call_clients(dev, VIDIOC_G_CTRL, ctrl);
- rc = 0;
- }
+ else
+ rc = em28xx_get_ctrl(dev, ctrl);
mutex_unlock(&dev->lock);
return rc;