diff options
author | Devin Heitmueller <dheitmueller@kernellabs.com> | 2012-08-06 21:46:54 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-08-09 19:32:00 -0400 |
commit | 364d2db2791aa3a808d2590ef62c53b4a83c25dd (patch) | |
tree | e58046c05e10a719af2cabe47952b3a7f4f4110d /drivers/media/video/au0828/au0828-video.c | |
parent | 43f2cccfc81c0af719a425ea816ce8003bb09748 (diff) |
[media] au0828: Make the s_reg and g_reg advanced debug calls work against the bridge
The g_reg and s_reg calls worked properly if acting on subdev registers
(such as the au8522), but didn't work against the au0828 itself. Copy
the logic over from em28xx.
Signed-off-by: Devin Heitmueller <dheitmueller@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/au0828/au0828-video.c')
-rw-r--r-- | drivers/media/video/au0828/au0828-video.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index ac3dd733ab81..6e30c094c56f 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c | |||
@@ -1717,8 +1717,12 @@ static int vidioc_g_register(struct file *file, void *priv, | |||
1717 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_register, reg); | 1717 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, g_register, reg); |
1718 | return 0; | 1718 | return 0; |
1719 | default: | 1719 | default: |
1720 | return -EINVAL; | 1720 | if (!v4l2_chip_match_host(®->match)) |
1721 | return -EINVAL; | ||
1721 | } | 1722 | } |
1723 | |||
1724 | reg->val = au0828_read(dev, reg->reg); | ||
1725 | return 0; | ||
1722 | } | 1726 | } |
1723 | 1727 | ||
1724 | static int vidioc_s_register(struct file *file, void *priv, | 1728 | static int vidioc_s_register(struct file *file, void *priv, |
@@ -1732,9 +1736,10 @@ static int vidioc_s_register(struct file *file, void *priv, | |||
1732 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_register, reg); | 1736 | v4l2_device_call_all(&dev->v4l2_dev, 0, core, s_register, reg); |
1733 | return 0; | 1737 | return 0; |
1734 | default: | 1738 | default: |
1735 | return -EINVAL; | 1739 | if (!v4l2_chip_match_host(®->match)) |
1740 | return -EINVAL; | ||
1736 | } | 1741 | } |
1737 | return 0; | 1742 | return au0828_writereg(dev, reg->reg, reg->val); |
1738 | } | 1743 | } |
1739 | #endif | 1744 | #endif |
1740 | 1745 | ||