v4l2-ctrls: add support for dynamically allocated arrays.
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Thu, 15 Apr 2021 11:56:53 +0000 (13:56 +0200)
committerDom Cobley <popcornmix@gmail.com>
Mon, 21 Mar 2022 16:04:20 +0000 (16:04 +0000)
commit8e13c2953fd9f652fb20636a34b221b930bdc76f
tree41e9656cc3f5ffe54aca9560d8fca1222ba68f75
parent8cb89ec1479f41ff12d48af4f9b58dbf374f008f
v4l2-ctrls: add support for dynamically allocated arrays.

Implement support for dynamically allocated arrays.

Most of the changes concern keeping track of the number of elements
of the array and the number of elements allocated for the array and
reallocating memory if needed.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
(cherry picked from commit fd5d45e6561f6f8c406b81aeddecaa11f0bd15af)
drivers/media/v4l2-core/v4l2-ctrls-api.c
drivers/media/v4l2-core/v4l2-ctrls-core.c
drivers/media/v4l2-core/v4l2-ctrls-priv.h
drivers/media/v4l2-core/v4l2-ctrls-request.c
include/media/v4l2-ctrls.h