@@ -1455,23 +1455,6 @@ static int imx274_s_frame_interval(struct v4l2_subdev *sd,
return ret;
}
-/**
- * imx274_load_default - load default control values
- * @priv: Pointer to device structure
- *
- * Return: 0 on success, errors otherwise
- */
-static void imx274_load_default(struct stimx274 *priv)
-{
- /* load default control values */
- priv->frame_interval.numerator = 1;
- priv->frame_interval.denominator = IMX274_DEF_FRAME_RATE;
- priv->ctrls.exposure->val = 1000000 / IMX274_DEF_FRAME_RATE;
- priv->ctrls.gain->val = IMX274_DEF_GAIN;
- priv->ctrls.vflip->val = 0;
- priv->ctrls.test_pattern->val = TEST_PATTERN_DISABLED;
-}
-
/**
* imx274_s_stream - It is used to start/stop the streaming.
* @sd: V4L2 Sub device
@@ -2094,7 +2077,7 @@ static int imx274_probe(struct i2c_client *client)
imx274->ctrls.test_pattern = v4l2_ctrl_new_std_menu_items(
&imx274->ctrls.handler, &imx274_ctrl_ops,
V4L2_CID_TEST_PATTERN,
- ARRAY_SIZE(tp_qmenu) - 1, 0, 0, tp_qmenu);
+ ARRAY_SIZE(tp_qmenu) - 1, 0, TEST_PATTERN_DISABLED, tp_qmenu);
imx274->ctrls.gain = v4l2_ctrl_new_std(
&imx274->ctrls.handler,
@@ -2108,7 +2091,7 @@ static int imx274_probe(struct i2c_client *client)
&imx274_ctrl_ops,
V4L2_CID_EXPOSURE, IMX274_MIN_EXPOSURE_TIME,
1000000 / IMX274_DEF_FRAME_RATE, 1,
- IMX274_MIN_EXPOSURE_TIME);
+ 1000000 / IMX274_DEF_FRAME_RATE);
imx274->ctrls.vflip = v4l2_ctrl_new_std(
&imx274->ctrls.handler,
@@ -2121,9 +2104,6 @@ static int imx274_probe(struct i2c_client *client)
goto err_ctrls;
}
- /* load default control values */
- imx274_load_default(imx274);
-
/* register subdevice */
ret = v4l2_async_register_subdev(sd);
if (ret < 0) {