aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov772x.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 21:32:12 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-06 21:32:12 -0500
commit9e9bc9736756f25d6c47b4eba0ebf25b20a6f153 (patch)
tree647240f479c5f23910c3e6194d1c35b6ba54d75e /drivers/media/video/ov772x.c
parent3c0cb7c31c206aaedb967e44b98442bbeb17a6c4 (diff)
parente3c92215198cb6aa00ad38db2780faa6b72e0a3f (diff)
Merge branch 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6
* 'v4l_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab/linux-2.6: (255 commits) [media] radio-aimslab.c: Fix gcc 4.5+ bug [media] cx25821: Fix compilation breakage due to BKL dependency [media] v4l2-compat-ioctl32: fix compile warning [media] zoran: fix compiler warning [media] tda18218: fix compile warning [media] ngene: fix compile warning [media] DVB: IR support for TechnoTrend CT-3650 [media] cx23885, cimax2.c: Fix case of two CAM insertion irq [media] ir-nec-decoder: fix repeat key issue [media] staging: se401 depends on USB [media] staging: usbvideo/vicam depends on USB [media] soc_camera: Add the ability to bind regulators to soc_camedra devices [media] V4L2: Add a v4l2-subdev (soc-camera) driver for OmniVision OV2640 sensor [media] v4l: soc-camera: switch to .unlocked_ioctl [media] v4l: ov772x: simplify pointer dereference [media] ov9640: fix OmniVision OV9640 sensor driver's priv data retrieving [media] ov9640: use macro to request OmniVision OV9640 sensor private data [media] ivtv-i2c: Fix two warnings [media] staging/lirc: Update lirc TODO files [media] cx88: Remove the obsolete i2c_adapter.id field ...
Diffstat (limited to 'drivers/media/video/ov772x.c')
-rw-r--r--drivers/media/video/ov772x.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index a84b770352f9..48895ef863ff 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
@@ -600,7 +600,7 @@ static int ov772x_reset(struct i2c_client *client)
600static int ov772x_s_stream(struct v4l2_subdev *sd, int enable) 600static int ov772x_s_stream(struct v4l2_subdev *sd, int enable)
601{ 601{
602 struct i2c_client *client = v4l2_get_subdevdata(sd); 602 struct i2c_client *client = v4l2_get_subdevdata(sd);
603 struct ov772x_priv *priv = to_ov772x(client); 603 struct ov772x_priv *priv = container_of(sd, struct ov772x_priv, subdev);
604 604
605 if (!enable) { 605 if (!enable) {
606 ov772x_mask_set(client, COM2, SOFT_SLEEP_MODE, SOFT_SLEEP_MODE); 606 ov772x_mask_set(client, COM2, SOFT_SLEEP_MODE, SOFT_SLEEP_MODE);
@@ -645,8 +645,7 @@ static unsigned long ov772x_query_bus_param(struct soc_camera_device *icd)
645 645
646static int ov772x_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) 646static int ov772x_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
647{ 647{
648 struct i2c_client *client = v4l2_get_subdevdata(sd); 648 struct ov772x_priv *priv = container_of(sd, struct ov772x_priv, subdev);
649 struct ov772x_priv *priv = to_ov772x(client);
650 649
651 switch (ctrl->id) { 650 switch (ctrl->id) {
652 case V4L2_CID_VFLIP: 651 case V4L2_CID_VFLIP:
@@ -665,7 +664,7 @@ static int ov772x_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
665static int ov772x_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) 664static int ov772x_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
666{ 665{
667 struct i2c_client *client = v4l2_get_subdevdata(sd); 666 struct i2c_client *client = v4l2_get_subdevdata(sd);
668 struct ov772x_priv *priv = to_ov772x(client); 667 struct ov772x_priv *priv = container_of(sd, struct ov772x_priv, subdev);
669 int ret = 0; 668 int ret = 0;
670 u8 val; 669 u8 val;
671 670
@@ -715,8 +714,7 @@ static int ov772x_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
715static int ov772x_g_chip_ident(struct v4l2_subdev *sd, 714static int ov772x_g_chip_ident(struct v4l2_subdev *sd,
716 struct v4l2_dbg_chip_ident *id) 715 struct v4l2_dbg_chip_ident *id)
717{ 716{
718 struct i2c_client *client = v4l2_get_subdevdata(sd); 717 struct ov772x_priv *priv = container_of(sd, struct ov772x_priv, subdev);
719 struct ov772x_priv *priv = to_ov772x(client);
720 718
721 id->ident = priv->model; 719 id->ident = priv->model;
722 id->revision = 0; 720 id->revision = 0;
@@ -955,7 +953,7 @@ static int ov772x_g_fmt(struct v4l2_subdev *sd,
955 struct v4l2_mbus_framefmt *mf) 953 struct v4l2_mbus_framefmt *mf)
956{ 954{
957 struct i2c_client *client = v4l2_get_subdevdata(sd); 955 struct i2c_client *client = v4l2_get_subdevdata(sd);
958 struct ov772x_priv *priv = to_ov772x(client); 956 struct ov772x_priv *priv = container_of(sd, struct ov772x_priv, subdev);
959 957
960 if (!priv->win || !priv->cfmt) { 958 if (!priv->win || !priv->cfmt) {
961 u32 width = VGA_WIDTH, height = VGA_HEIGHT; 959 u32 width = VGA_WIDTH, height = VGA_HEIGHT;
@@ -978,7 +976,7 @@ static int ov772x_s_fmt(struct v4l2_subdev *sd,
978 struct v4l2_mbus_framefmt *mf) 976 struct v4l2_mbus_framefmt *mf)
979{ 977{
980 struct i2c_client *client = v4l2_get_subdevdata(sd); 978 struct i2c_client *client = v4l2_get_subdevdata(sd);
981 struct ov772x_priv *priv = to_ov772x(client); 979 struct ov772x_priv *priv = container_of(sd, struct ov772x_priv, subdev);
982 int ret = ov772x_set_params(client, &mf->width, &mf->height, 980 int ret = ov772x_set_params(client, &mf->width, &mf->height,
983 mf->code); 981 mf->code);
984 982
@@ -991,8 +989,7 @@ static int ov772x_s_fmt(struct v4l2_subdev *sd,
991static int ov772x_try_fmt(struct v4l2_subdev *sd, 989static int ov772x_try_fmt(struct v4l2_subdev *sd,
992 struct v4l2_mbus_framefmt *mf) 990 struct v4l2_mbus_framefmt *mf)
993{ 991{
994 struct i2c_client *client = v4l2_get_subdevdata(sd); 992 struct ov772x_priv *priv = container_of(sd, struct ov772x_priv, subdev);
995 struct ov772x_priv *priv = to_ov772x(client);
996 const struct ov772x_win_size *win; 993 const struct ov772x_win_size *win;
997 int i; 994 int i;
998 995