diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-22 04:20:32 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-30 06:39:22 -0500 |
commit | b6070f0756fe1bccda1c8c67a6bfdfa51022b664 (patch) | |
tree | d2aa714fcff17fd2fdffe2cfae1f51d59a725a4a /drivers/media/video/em28xx/em28xx-video.c | |
parent | 5db0b5e1adff92dac54f2dfb1846a42501c8f7d9 (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>
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | drivers/media/video/em28xx/em28xx-video.c | 12 |
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 fc41eead640b..4701b6589b10 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, | |||
1057 | rc = check_dev(dev); | 1057 | rc = check_dev(dev); |
1058 | if (rc < 0) | 1058 | if (rc < 0) |
1059 | return rc; | 1059 | return rc; |
1060 | rc = 0; | ||
1060 | 1061 | ||
1061 | mutex_lock(&dev->lock); | 1062 | mutex_lock(&dev->lock); |
1062 | 1063 | ||
1063 | if (!dev->board.has_msp34xx) | 1064 | if (dev->board.has_msp34xx) |
1064 | rc = em28xx_get_ctrl(dev, ctrl); | ||
1065 | else | ||
1066 | rc = -EINVAL; | ||
1067 | |||
1068 | if (rc == -EINVAL) { | ||
1069 | em28xx_i2c_call_clients(dev, VIDIOC_G_CTRL, ctrl); | 1065 | em28xx_i2c_call_clients(dev, VIDIOC_G_CTRL, ctrl); |
1070 | rc = 0; | 1066 | else |
1071 | } | 1067 | rc = em28xx_get_ctrl(dev, ctrl); |
1072 | 1068 | ||
1073 | mutex_unlock(&dev->lock); | 1069 | mutex_unlock(&dev->lock); |
1074 | return rc; | 1070 | return rc; |