media: uvcvideo: Refactor frame parsing code into a uvc_parse_frame function
authorBenoit Sevens <bsevens@google.com>
Thu, 7 Nov 2024 14:22:03 +0000 (14:22 +0000)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Thu, 19 Dec 2024 14:44:43 +0000 (14:44 +0000)
commit082dd785e20860fcddaab815903c2e54dadd0cc7
tree025e2d8a44b24d095ba4342813620f117dad2228
parent840fb2c33904c0e56b6c2d2bd2683ac6c30933ea
media: uvcvideo: Refactor frame parsing code into a uvc_parse_frame function

The ftype value does not change in the while loop so we can check it
before entering the while loop. Refactoring the frame parsing code into
a dedicated uvc_parse_frame function makes this more readable.

Signed-off-by: Benoit Sevens <bsevens@google.com>
Link: https://lore.kernel.org/r/20241107142204.1182969-3-bsevens@google.com
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/usb/uvc/uvc_driver.c