aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/mt9t112.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/mt9t112.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/mt9t112.c')
-rw-r--r--drivers/media/video/mt9t112.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/media/video/mt9t112.c b/drivers/media/video/mt9t112.c
index 8ec47e42d4d0..bffa9ee10968 100644
--- a/drivers/media/video/mt9t112.c
+++ b/drivers/media/video/mt9t112.c
@@ -804,7 +804,7 @@ static struct soc_camera_ops mt9t112_ops = {
804static int mt9t112_g_chip_ident(struct v4l2_subdev *sd, 804static int mt9t112_g_chip_ident(struct v4l2_subdev *sd,
805 struct v4l2_dbg_chip_ident *id) 805 struct v4l2_dbg_chip_ident *id)
806{ 806{
807 struct i2c_client *client = sd->priv; 807 struct i2c_client *client = v4l2_get_subdevdata(sd);
808 struct mt9t112_priv *priv = to_mt9t112(client); 808 struct mt9t112_priv *priv = to_mt9t112(client);
809 809
810 id->ident = priv->model; 810 id->ident = priv->model;
@@ -817,7 +817,7 @@ static int mt9t112_g_chip_ident(struct v4l2_subdev *sd,
817static int mt9t112_g_register(struct v4l2_subdev *sd, 817static int mt9t112_g_register(struct v4l2_subdev *sd,
818 struct v4l2_dbg_register *reg) 818 struct v4l2_dbg_register *reg)
819{ 819{
820 struct i2c_client *client = sd->priv; 820 struct i2c_client *client = v4l2_get_subdevdata(sd);
821 int ret; 821 int ret;
822 822
823 reg->size = 2; 823 reg->size = 2;
@@ -831,7 +831,7 @@ static int mt9t112_g_register(struct v4l2_subdev *sd,
831static int mt9t112_s_register(struct v4l2_subdev *sd, 831static int mt9t112_s_register(struct v4l2_subdev *sd,
832 struct v4l2_dbg_register *reg) 832 struct v4l2_dbg_register *reg)
833{ 833{
834 struct i2c_client *client = sd->priv; 834 struct i2c_client *client = v4l2_get_subdevdata(sd);
835 int ret; 835 int ret;
836 836
837 mt9t112_reg_write(ret, client, reg->reg, reg->val); 837 mt9t112_reg_write(ret, client, reg->reg, reg->val);
@@ -858,7 +858,7 @@ static struct v4l2_subdev_core_ops mt9t112_subdev_core_ops = {
858************************************************************************/ 858************************************************************************/
859static int mt9t112_s_stream(struct v4l2_subdev *sd, int enable) 859static int mt9t112_s_stream(struct v4l2_subdev *sd, int enable)
860{ 860{
861 struct i2c_client *client = sd->priv; 861 struct i2c_client *client = v4l2_get_subdevdata(sd);
862 struct mt9t112_priv *priv = to_mt9t112(client); 862 struct mt9t112_priv *priv = to_mt9t112(client);
863 int ret = 0; 863 int ret = 0;
864 864
@@ -968,7 +968,7 @@ static int mt9t112_g_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
968 968
969static int mt9t112_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a) 969static int mt9t112_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
970{ 970{
971 struct i2c_client *client = sd->priv; 971 struct i2c_client *client = v4l2_get_subdevdata(sd);
972 struct v4l2_rect *rect = &a->c; 972 struct v4l2_rect *rect = &a->c;
973 973
974 return mt9t112_set_params(client, rect->width, rect->height, 974 return mt9t112_set_params(client, rect->width, rect->height,
@@ -978,7 +978,7 @@ static int mt9t112_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
978static int mt9t112_g_fmt(struct v4l2_subdev *sd, 978static int mt9t112_g_fmt(struct v4l2_subdev *sd,
979 struct v4l2_mbus_framefmt *mf) 979 struct v4l2_mbus_framefmt *mf)
980{ 980{
981 struct i2c_client *client = sd->priv; 981 struct i2c_client *client = v4l2_get_subdevdata(sd);
982 struct mt9t112_priv *priv = to_mt9t112(client); 982 struct mt9t112_priv *priv = to_mt9t112(client);
983 983
984 if (!priv->format) { 984 if (!priv->format) {
@@ -1000,7 +1000,7 @@ static int mt9t112_g_fmt(struct v4l2_subdev *sd,
1000static int mt9t112_s_fmt(struct v4l2_subdev *sd, 1000static int mt9t112_s_fmt(struct v4l2_subdev *sd,
1001 struct v4l2_mbus_framefmt *mf) 1001 struct v4l2_mbus_framefmt *mf)
1002{ 1002{
1003 struct i2c_client *client = sd->priv; 1003 struct i2c_client *client = v4l2_get_subdevdata(sd);
1004 1004
1005 /* TODO: set colorspace */ 1005 /* TODO: set colorspace */
1006 return mt9t112_set_params(client, mf->width, mf->height, mf->code); 1006 return mt9t112_set_params(client, mf->width, mf->height, mf->code);