Hans Verkuil <hverk...@xs4all.nl> writes:

[zip]

> @@ -1067,6 +968,26 @@ static int mt9m111_probe(struct i2c_client *client,
>               return -ENOMEM;
>  
>       v4l2_i2c_subdev_init(&mt9m111->subdev, client, &mt9m111_subdev_ops);
> +     v4l2_ctrl_handler_init(&mt9m111->hdl, 5);
> +     v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops,
> +                     V4L2_CID_VFLIP, 0, 1, 1, 0);
> +     v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops,
> +                     V4L2_CID_HFLIP, 0, 1, 1, 0);
> +     v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops,
> +                     V4L2_CID_AUTO_WHITE_BALANCE, 0, 1, 1, 1);
> +     mt9m111->gain = v4l2_ctrl_new_std(&mt9m111->hdl, &mt9m111_ctrl_ops,
> +                     V4L2_CID_GAIN, 0, 63 * 2 * 2, 1, 32);
> +     v4l2_ctrl_new_std_menu(&mt9m111->hdl,
> +                     &mt9m111_ctrl_ops, V4L2_CID_EXPOSURE_AUTO, 1, 0,
> +                     V4L2_EXPOSURE_AUTO);
> +     mt9m111->subdev.ctrl_handler = &mt9m111->hdl;
> +     if (mt9m111->hdl.error) {
> +             int err = mt9m111->hdl.error;
> +
> +             kfree(mt9m111);
> +             return err;
> +     }
> +     mt9m111->gain->is_volatile = 1;

Hi Hans,

I would like to shift all the control initializations into one subfunction,
called from mt9m111_probe(). Right now it's not an issue, but if future
development adds a lot of controls, I'd like the controls initialization to be
gathered in one method.

Apart from that, I have no special comment.

Cheers.

--
Robert
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to