linux-imx/drivers/media/usb/uvc
Ricardo Ribalda d8915d2716 media: uvcvideo: Enforce alignment of frame and interval
[ Upstream commit c8931ef55b ]

Struct uvc_frame and interval (u32*) are packaged together on
streaming->formats on a single contiguous allocation.

Right now they are allocated right after uvc_format, without taking into
consideration their required alignment.

This is working fine because both structures have a field with a
pointer, but it will stop working when the sizeof() of any of those
structs is not a multiple of the sizeof(void*).

Enforce that alignment during the allocation.

Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Link: https://lore.kernel.org/r/20240404-uvc-align-v2-1-9e104b0ecfbd@chromium.org
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-09-08 07:54:49 +02:00
..
Kconfig
Makefile
uvc_ctrl.c media: uvcvideo: Override default flags 2024-08-03 08:53:49 +02:00
uvc_debugfs.c
uvc_driver.c media: uvcvideo: Enforce alignment of frame and interval 2024-09-08 07:54:49 +02:00
uvc_entity.c
uvc_isight.c
uvc_metadata.c
uvc_queue.c
uvc_status.c
uvc_v4l2.c
uvc_video.c media: uvcvideo: Fix the bandwdith quirk on USB 3.x 2024-08-14 13:58:46 +02:00
uvcvideo.h media: uvcvideo: Quirk for invalid dev_sof in Logitech C922 2024-08-03 08:53:49 +02:00