diff options
author | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-22 07:20:32 -0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2008-12-22 07:20:32 -0200 |
commit | 290fdd37a2914bb6aa8e67179c1d539c5cddd81c (patch) | |
tree | 5c04ce2a090703b2af58fc5b427c0ee5fed3036d /linux/drivers/media/video/em28xx/em28xx-video.c | |
parent | a47d14089127cf096b56de570d96ac0d2611f679 (diff) | |
download | mediapointer-dvb-s2-290fdd37a2914bb6aa8e67179c1d539c5cddd81c.tar.gz mediapointer-dvb-s2-290fdd37a2914bb6aa8e67179c1d539c5cddd81c.tar.bz2 |
em28xx: de-obfuscate vidioc_g_ctrl logic
From: Mauro Carvalho Chehab <mchehab@redhat.com>
vidioc_g_ctrl() were using an uneeded confusing logic. Instead, use the
direct approach.
Priority: normal
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/em28xx/em28xx-video.c')
-rw-r--r-- | linux/drivers/media/video/em28xx/em28xx-video.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/linux/drivers/media/video/em28xx/em28xx-video.c b/linux/drivers/media/video/em28xx/em28xx-video.c index de4065bd7..7531a20f7 100644 --- a/linux/drivers/media/video/em28xx/em28xx-video.c +++ b/linux/drivers/media/video/em28xx/em28xx-video.c @@ -1069,18 +1069,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; |