diff options
-rw-r--r-- | drivers/media/video/ov772x.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c index 74e77d327ed8..6d79b89b8603 100644 --- a/drivers/media/video/ov772x.c +++ b/drivers/media/video/ov772x.c | |||
@@ -880,15 +880,11 @@ static int ov772x_cropcap(struct v4l2_subdev *sd, struct v4l2_cropcap *a) | |||
880 | static int ov772x_g_fmt(struct v4l2_subdev *sd, | 880 | static int ov772x_g_fmt(struct v4l2_subdev *sd, |
881 | struct v4l2_mbus_framefmt *mf) | 881 | struct v4l2_mbus_framefmt *mf) |
882 | { | 882 | { |
883 | struct i2c_client *client = v4l2_get_subdevdata(sd); | ||
884 | struct ov772x_priv *priv = container_of(sd, struct ov772x_priv, subdev); | 883 | struct ov772x_priv *priv = container_of(sd, struct ov772x_priv, subdev); |
885 | 884 | ||
886 | if (!priv->win || !priv->cfmt) { | 885 | if (!priv->win || !priv->cfmt) { |
887 | u32 width = VGA_WIDTH, height = VGA_HEIGHT; | 886 | priv->cfmt = &ov772x_cfmts[0]; |
888 | int ret = ov772x_set_params(client, &width, &height, | 887 | priv->win = ov772x_select_win(VGA_WIDTH, VGA_HEIGHT); |
889 | V4L2_MBUS_FMT_YUYV8_2X8); | ||
890 | if (ret < 0) | ||
891 | return ret; | ||
892 | } | 888 | } |
893 | 889 | ||
894 | mf->width = priv->win->width; | 890 | mf->width = priv->win->width; |