diff options
Diffstat (limited to 'drivers/media/i2c/mt9p031.c')
-rw-r--r-- | drivers/media/i2c/mt9p031.c | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/drivers/media/i2c/mt9p031.c b/drivers/media/i2c/mt9p031.c index 2c0f4077c491..e32833262d32 100644 --- a/drivers/media/i2c/mt9p031.c +++ b/drivers/media/i2c/mt9p031.c | |||
@@ -574,7 +574,6 @@ static int mt9p031_set_crop(struct v4l2_subdev *subdev, | |||
574 | * V4L2 subdev control operations | 574 | * V4L2 subdev control operations |
575 | */ | 575 | */ |
576 | 576 | ||
577 | #define V4L2_CID_TEST_PATTERN (V4L2_CID_USER_BASE | 0x1001) | ||
578 | #define V4L2_CID_BLC_AUTO (V4L2_CID_USER_BASE | 0x1002) | 577 | #define V4L2_CID_BLC_AUTO (V4L2_CID_USER_BASE | 0x1002) |
579 | #define V4L2_CID_BLC_TARGET_LEVEL (V4L2_CID_USER_BASE | 0x1003) | 578 | #define V4L2_CID_BLC_TARGET_LEVEL (V4L2_CID_USER_BASE | 0x1003) |
580 | #define V4L2_CID_BLC_ANALOG_OFFSET (V4L2_CID_USER_BASE | 0x1004) | 579 | #define V4L2_CID_BLC_ANALOG_OFFSET (V4L2_CID_USER_BASE | 0x1004) |
@@ -740,18 +739,6 @@ static const char * const mt9p031_test_pattern_menu[] = { | |||
740 | static const struct v4l2_ctrl_config mt9p031_ctrls[] = { | 739 | static const struct v4l2_ctrl_config mt9p031_ctrls[] = { |
741 | { | 740 | { |
742 | .ops = &mt9p031_ctrl_ops, | 741 | .ops = &mt9p031_ctrl_ops, |
743 | .id = V4L2_CID_TEST_PATTERN, | ||
744 | .type = V4L2_CTRL_TYPE_MENU, | ||
745 | .name = "Test Pattern", | ||
746 | .min = 0, | ||
747 | .max = ARRAY_SIZE(mt9p031_test_pattern_menu) - 1, | ||
748 | .step = 0, | ||
749 | .def = 0, | ||
750 | .flags = 0, | ||
751 | .menu_skip_mask = 0, | ||
752 | .qmenu = mt9p031_test_pattern_menu, | ||
753 | }, { | ||
754 | .ops = &mt9p031_ctrl_ops, | ||
755 | .id = V4L2_CID_BLC_AUTO, | 742 | .id = V4L2_CID_BLC_AUTO, |
756 | .type = V4L2_CTRL_TYPE_BOOLEAN, | 743 | .type = V4L2_CTRL_TYPE_BOOLEAN, |
757 | .name = "BLC, Auto", | 744 | .name = "BLC, Auto", |
@@ -950,7 +937,7 @@ static int mt9p031_probe(struct i2c_client *client, | |||
950 | mt9p031->model = did->driver_data; | 937 | mt9p031->model = did->driver_data; |
951 | mt9p031->reset = -1; | 938 | mt9p031->reset = -1; |
952 | 939 | ||
953 | v4l2_ctrl_handler_init(&mt9p031->ctrls, ARRAY_SIZE(mt9p031_ctrls) + 5); | 940 | v4l2_ctrl_handler_init(&mt9p031->ctrls, ARRAY_SIZE(mt9p031_ctrls) + 6); |
954 | 941 | ||
955 | v4l2_ctrl_new_std(&mt9p031->ctrls, &mt9p031_ctrl_ops, | 942 | v4l2_ctrl_new_std(&mt9p031->ctrls, &mt9p031_ctrl_ops, |
956 | V4L2_CID_EXPOSURE, MT9P031_SHUTTER_WIDTH_MIN, | 943 | V4L2_CID_EXPOSURE, MT9P031_SHUTTER_WIDTH_MIN, |
@@ -966,6 +953,10 @@ static int mt9p031_probe(struct i2c_client *client, | |||
966 | v4l2_ctrl_new_std(&mt9p031->ctrls, &mt9p031_ctrl_ops, | 953 | v4l2_ctrl_new_std(&mt9p031->ctrls, &mt9p031_ctrl_ops, |
967 | V4L2_CID_PIXEL_RATE, pdata->target_freq, | 954 | V4L2_CID_PIXEL_RATE, pdata->target_freq, |
968 | pdata->target_freq, 1, pdata->target_freq); | 955 | pdata->target_freq, 1, pdata->target_freq); |
956 | v4l2_ctrl_new_std_menu_items(&mt9p031->ctrls, &mt9p031_ctrl_ops, | ||
957 | V4L2_CID_TEST_PATTERN, | ||
958 | ARRAY_SIZE(mt9p031_test_pattern_menu) - 1, 0, | ||
959 | 0, mt9p031_test_pattern_menu); | ||
969 | 960 | ||
970 | for (i = 0; i < ARRAY_SIZE(mt9p031_ctrls); ++i) | 961 | for (i = 0; i < ARRAY_SIZE(mt9p031_ctrls); ++i) |
971 | v4l2_ctrl_new_custom(&mt9p031->ctrls, &mt9p031_ctrls[i], NULL); | 962 | v4l2_ctrl_new_custom(&mt9p031->ctrls, &mt9p031_ctrls[i], NULL); |