aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-ctrls.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/v4l2-ctrls.c')
-rw-r--r--drivers/media/video/v4l2-ctrls.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
index 0f415dade05a..da1f4c2d2d4b 100644
--- a/drivers/media/video/v4l2-ctrls.c
+++ b/drivers/media/video/v4l2-ctrls.c
@@ -467,6 +467,7 @@ const char *v4l2_ctrl_get_name(u32 id)
467 case V4L2_CID_ILLUMINATORS_2: return "Illuminator 2"; 467 case V4L2_CID_ILLUMINATORS_2: return "Illuminator 2";
468 case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: return "Minimum Number of Capture Buffers"; 468 case V4L2_CID_MIN_BUFFERS_FOR_CAPTURE: return "Minimum Number of Capture Buffers";
469 case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: return "Minimum Number of Output Buffers"; 469 case V4L2_CID_MIN_BUFFERS_FOR_OUTPUT: return "Minimum Number of Output Buffers";
470 case V4L2_CID_ALPHA_COMPONENT: return "Alpha Component";
470 471
471 /* MPEG controls */ 472 /* MPEG controls */
472 /* Keep the order of the 'case's the same as in videodev2.h! */ 473 /* Keep the order of the 'case's the same as in videodev2.h! */
@@ -1108,8 +1109,8 @@ int v4l2_ctrl_handler_init(struct v4l2_ctrl_handler *hdl,
1108 INIT_LIST_HEAD(&hdl->ctrls); 1109 INIT_LIST_HEAD(&hdl->ctrls);
1109 INIT_LIST_HEAD(&hdl->ctrl_refs); 1110 INIT_LIST_HEAD(&hdl->ctrl_refs);
1110 hdl->nr_of_buckets = 1 + nr_of_controls_hint / 8; 1111 hdl->nr_of_buckets = 1 + nr_of_controls_hint / 8;
1111 hdl->buckets = kzalloc(sizeof(hdl->buckets[0]) * hdl->nr_of_buckets, 1112 hdl->buckets = kcalloc(hdl->nr_of_buckets, sizeof(hdl->buckets[0]),
1112 GFP_KERNEL); 1113 GFP_KERNEL);
1113 hdl->error = hdl->buckets ? 0 : -ENOMEM; 1114 hdl->error = hdl->buckets ? 0 : -ENOMEM;
1114 return hdl->error; 1115 return hdl->error;
1115} 1116}