aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ov772x.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2010-07-30 16:24:54 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-20 23:04:51 -0400
commitc4ce6d14b92aa1772c9d84d068d1b45114fe73cc (patch)
treeb2c492597824d43fad603cc686c3d16b3f766b0c /drivers/media/video/ov772x.c
parent401ad27867781c327855025d4becd5bc30fe7e42 (diff)
V4L/DVB: v4l: Use v4l2_get_subdevdata instead of accessing v4l2_subdev::priv
Replace direct access to the v4l2_subdev priv field with the inline v4l2_get_subdevdata method. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ov772x.c')
-rw-r--r--drivers/media/video/ov772x.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c
index 25eb5d637eea..a84b770352f9 100644
--- a/drivers/media/video/ov772x.c
+++ b/drivers/media/video/ov772x.c
@@ -599,7 +599,7 @@ static int ov772x_reset(struct i2c_client *client)
599 599
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 = sd->priv; 602 struct i2c_client *client = v4l2_get_subdevdata(sd);
603 struct ov772x_priv *priv = to_ov772x(client); 603 struct ov772x_priv *priv = to_ov772x(client);
604 604
605 if (!enable) { 605 if (!enable) {
@@ -645,7 +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 = sd->priv; 648 struct i2c_client *client = v4l2_get_subdevdata(sd);
649 struct ov772x_priv *priv = to_ov772x(client); 649 struct ov772x_priv *priv = to_ov772x(client);
650 650
651 switch (ctrl->id) { 651 switch (ctrl->id) {
@@ -664,7 +664,7 @@ static int ov772x_g_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
664 664
665static int ov772x_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl) 665static int ov772x_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
666{ 666{
667 struct i2c_client *client = sd->priv; 667 struct i2c_client *client = v4l2_get_subdevdata(sd);
668 struct ov772x_priv *priv = to_ov772x(client); 668 struct ov772x_priv *priv = to_ov772x(client);
669 int ret = 0; 669 int ret = 0;
670 u8 val; 670 u8 val;
@@ -715,7 +715,7 @@ static int ov772x_s_ctrl(struct v4l2_subdev *sd, struct v4l2_control *ctrl)
715static int ov772x_g_chip_ident(struct v4l2_subdev *sd, 715static int ov772x_g_chip_ident(struct v4l2_subdev *sd,
716 struct v4l2_dbg_chip_ident *id) 716 struct v4l2_dbg_chip_ident *id)
717{ 717{
718 struct i2c_client *client = sd->priv; 718 struct i2c_client *client = v4l2_get_subdevdata(sd);
719 struct ov772x_priv *priv = to_ov772x(client); 719 struct ov772x_priv *priv = to_ov772x(client);
720 720
721 id->ident = priv->model; 721 id->ident = priv->model;
@@ -728,7 +728,7 @@ static int ov772x_g_chip_ident(struct v4l2_subdev *sd,
728static int ov772x_g_register(struct v4l2_subdev *sd, 728static int ov772x_g_register(struct v4l2_subdev *sd,
729 struct v4l2_dbg_register *reg) 729 struct v4l2_dbg_register *reg)
730{ 730{
731 struct i2c_client *client = sd->priv; 731 struct i2c_client *client = v4l2_get_subdevdata(sd);
732 int ret; 732 int ret;
733 733
734 reg->size = 1; 734 reg->size = 1;
@@ -747,7 +747,7 @@ static int ov772x_g_register(struct v4l2_subdev *sd,
747static int ov772x_s_register(struct v4l2_subdev *sd, 747static int ov772x_s_register(struct v4l2_subdev *sd,
748 struct v4l2_dbg_register *reg) 748 struct v4l2_dbg_register *reg)
749{ 749{
750 struct i2c_client *client = sd->priv; 750 struct i2c_client *client = v4l2_get_subdevdata(sd);
751 751
752 if (reg->reg > 0xff || 752 if (reg->reg > 0xff ||
753 reg->val > 0xff) 753 reg->val > 0xff)
@@ -954,7 +954,7 @@ static int ov772x_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a)
954static int ov772x_g_fmt(struct v4l2_subdev *sd, 954static int ov772x_g_fmt(struct v4l2_subdev *sd,
955 struct v4l2_mbus_framefmt *mf) 955 struct v4l2_mbus_framefmt *mf)
956{ 956{
957 struct i2c_client *client = sd->priv; 957 struct i2c_client *client = v4l2_get_subdevdata(sd);
958 struct ov772x_priv *priv = to_ov772x(client); 958 struct ov772x_priv *priv = to_ov772x(client);
959 959
960 if (!priv->win || !priv->cfmt) { 960 if (!priv->win || !priv->cfmt) {
@@ -977,7 +977,7 @@ static int ov772x_g_fmt(struct v4l2_subdev *sd,
977static int ov772x_s_fmt(struct v4l2_subdev *sd, 977static int ov772x_s_fmt(struct v4l2_subdev *sd,
978 struct v4l2_mbus_framefmt *mf) 978 struct v4l2_mbus_framefmt *mf)
979{ 979{
980 struct i2c_client *client = sd->priv; 980 struct i2c_client *client = v4l2_get_subdevdata(sd);
981 struct ov772x_priv *priv = to_ov772x(client); 981 struct ov772x_priv *priv = to_ov772x(client);
982 int ret = ov772x_set_params(client, &mf->width, &mf->height, 982 int ret = ov772x_set_params(client, &mf->width, &mf->height,
983 mf->code); 983 mf->code);
@@ -991,7 +991,7 @@ static int ov772x_s_fmt(struct v4l2_subdev *sd,
991static int ov772x_try_fmt(struct v4l2_subdev *sd, 991static int ov772x_try_fmt(struct v4l2_subdev *sd,
992 struct v4l2_mbus_framefmt *mf) 992 struct v4l2_mbus_framefmt *mf)
993{ 993{
994 struct i2c_client *client = sd->priv; 994 struct i2c_client *client = v4l2_get_subdevdata(sd);
995 struct ov772x_priv *priv = to_ov772x(client); 995 struct ov772x_priv *priv = to_ov772x(client);
996 const struct ov772x_win_size *win; 996 const struct ov772x_win_size *win;
997 int i; 997 int i;