]> git.baikalelectronics.ru Git - kernel.git/commit
media: stkwebcam: move stk_camera_read_reg() scratch buffer to struct stk_camera
authorTom Rix <trix@redhat.com>
Sat, 12 Mar 2022 17:30:49 +0000 (18:30 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:20 +0000 (11:02 +0200)
commitf98117d3b2fc6ec210b1d5f8e5c2c8318ee05b0c
tree76ab317f750983f0a1d24da93a79d7f67697506d
parent1cae679ba325474b7be5ba8139af672502e14ddf
media: stkwebcam: move stk_camera_read_reg() scratch buffer to struct stk_camera

In stk_camera_read_reg() a single byte buffer is alloc-ed and
freed on every function call.  Since the size is known,
move the buffer to the struct stk_camera where it will be alloc-ed
and freed once.

Signed-off-by: Tom Rix <trix@redhat.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/usb/stkwebcam/stk-webcam.c
drivers/media/usb/stkwebcam/stk-webcam.h