Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 306561
b: refs/heads/master
c: 06b491f
h: refs/heads/master
i:
  306559: 8c33cc6
v: v3
  • Loading branch information
Sakari Ailus authored and Mauro Carvalho Chehab committed May 20, 2012
1 parent e68fb2d commit b3a10f5
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b8cc8d7a5719754d39a9f3b4d9752389651df58a
refs/heads/master: 06b491fb9a8a13225d6c9fd798b5feb92f26d126
17 changes: 6 additions & 11 deletions trunk/drivers/media/video/smiapp/smiapp-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -508,7 +508,7 @@ static const struct v4l2_ctrl_ops smiapp_ctrl_ops = {
static int smiapp_init_controls(struct smiapp_sensor *sensor)
{
struct i2c_client *client = v4l2_get_subdevdata(&sensor->src->sd);
struct v4l2_ctrl_config cfg;
unsigned int max;
int rval;

rval = v4l2_ctrl_handler_init(&sensor->pixel_array->ctrl_handler, 7);
Expand Down Expand Up @@ -572,17 +572,12 @@ static int smiapp_init_controls(struct smiapp_sensor *sensor)
goto error;
sensor->src->ctrl_handler.lock = &sensor->mutex;

memset(&cfg, 0, sizeof(cfg));
for (max = 0; sensor->platform_data->op_sys_clock[max + 1]; max++);

cfg.ops = &smiapp_ctrl_ops;
cfg.id = V4L2_CID_LINK_FREQ;
cfg.type = V4L2_CTRL_TYPE_INTEGER_MENU;
while (sensor->platform_data->op_sys_clock[cfg.max + 1])
cfg.max++;
cfg.qmenu_int = sensor->platform_data->op_sys_clock;

sensor->link_freq = v4l2_ctrl_new_custom(
&sensor->src->ctrl_handler, &cfg, NULL);
sensor->link_freq = v4l2_ctrl_new_int_menu(
&sensor->src->ctrl_handler, &smiapp_ctrl_ops,
V4L2_CID_LINK_FREQ, max, 0,
sensor->platform_data->op_sys_clock);

sensor->pixel_rate_csi = v4l2_ctrl_new_std(
&sensor->src->ctrl_handler, &smiapp_ctrl_ops,
Expand Down

0 comments on commit b3a10f5

Please sign in to comment.