aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/media/video/au0828/au0828-video.c11
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(&reg->match))
1721 return -EINVAL;
1721 } 1722 }
1723
1724 reg->val = au0828_read(dev, reg->reg);
1725 return 0;
1722} 1726}
1723 1727
1724static int vidioc_s_register(struct file *file, void *priv, 1728static 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(&reg->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