}
static int ov772x_set_params(struct i2c_client *client,
- u32 width, u32 height, u32 pixfmt)
+ u32 *width, u32 *height, u32 pixfmt)
{
struct ov772x_priv *priv = to_ov772x(client);
int ret = -EINVAL;
/*
* select win
*/
- priv->win = ov772x_select_win(width, height);
+ priv->win = ov772x_select_win(*width, *height);
/*
* reset hardware
goto ov772x_set_fmt_error;
}
+ *width = priv->win->width;
+ *height = priv->win->height;
+
return ret;
ov772x_set_fmt_error:
if (!priv->fmt)
return -EINVAL;
- return ov772x_set_params(client, rect->width, rect->height,
+ return ov772x_set_params(client, &rect->width, &rect->height,
priv->fmt->fourcc);
}
struct i2c_client *client = sd->priv;
struct v4l2_pix_format *pix = &f->fmt.pix;
- return ov772x_set_params(client, pix->width, pix->height,
+ return ov772x_set_params(client, &pix->width, &pix->height,
pix->pixelformat);
}