diff options
-rw-r--r-- | drivers/media/video/ov772x.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/media/video/ov772x.c b/drivers/media/video/ov772x.c index 3417398e1b50..c0c549fa786f 100644 --- a/drivers/media/video/ov772x.c +++ b/drivers/media/video/ov772x.c | |||
@@ -806,7 +806,7 @@ static const struct ov772x_win_size *ov772x_select_win(u32 width, u32 height) | |||
806 | } | 806 | } |
807 | 807 | ||
808 | static int ov772x_set_params(struct i2c_client *client, | 808 | static int ov772x_set_params(struct i2c_client *client, |
809 | u32 width, u32 height, u32 pixfmt) | 809 | u32 *width, u32 *height, u32 pixfmt) |
810 | { | 810 | { |
811 | struct ov772x_priv *priv = to_ov772x(client); | 811 | struct ov772x_priv *priv = to_ov772x(client); |
812 | int ret = -EINVAL; | 812 | int ret = -EINVAL; |
@@ -829,7 +829,7 @@ static int ov772x_set_params(struct i2c_client *client, | |||
829 | /* | 829 | /* |
830 | * select win | 830 | * select win |
831 | */ | 831 | */ |
832 | priv->win = ov772x_select_win(width, height); | 832 | priv->win = ov772x_select_win(*width, *height); |
833 | 833 | ||
834 | /* | 834 | /* |
835 | * reset hardware | 835 | * reset hardware |
@@ -941,6 +941,9 @@ static int ov772x_set_params(struct i2c_client *client, | |||
941 | goto ov772x_set_fmt_error; | 941 | goto ov772x_set_fmt_error; |
942 | } | 942 | } |
943 | 943 | ||
944 | *width = priv->win->width; | ||
945 | *height = priv->win->height; | ||
946 | |||
944 | return ret; | 947 | return ret; |
945 | 948 | ||
946 | ov772x_set_fmt_error: | 949 | ov772x_set_fmt_error: |
@@ -961,7 +964,7 @@ static int ov772x_set_crop(struct soc_camera_device *icd, | |||
961 | if (!priv->fmt) | 964 | if (!priv->fmt) |
962 | return -EINVAL; | 965 | return -EINVAL; |
963 | 966 | ||
964 | return ov772x_set_params(client, rect->width, rect->height, | 967 | return ov772x_set_params(client, &rect->width, &rect->height, |
965 | priv->fmt->fourcc); | 968 | priv->fmt->fourcc); |
966 | } | 969 | } |
967 | 970 | ||
@@ -970,7 +973,7 @@ static int ov772x_s_fmt(struct v4l2_subdev *sd, struct v4l2_format *f) | |||
970 | struct i2c_client *client = sd->priv; | 973 | struct i2c_client *client = sd->priv; |
971 | struct v4l2_pix_format *pix = &f->fmt.pix; | 974 | struct v4l2_pix_format *pix = &f->fmt.pix; |
972 | 975 | ||
973 | return ov772x_set_params(client, pix->width, pix->height, | 976 | return ov772x_set_params(client, &pix->width, &pix->height, |
974 | pix->pixelformat); | 977 | pix->pixelformat); |
975 | } | 978 | } |
976 | 979 | ||