usb: gadget: uvc: rework uvcg_queue_next_buffer to uvcg_complete_buffer
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Sat, 2 Apr 2022 23:27:42 +0000 (01:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Oct 2022 08:12:53 +0000 (10:12 +0200)
commitaee340dccf5a09a4a346db7a46cef6cf26cb48fa
treee0de402aefc52568ee73ac506dd08dd298dc6d5f
parent2f54ce7392d7c7cc5760f625c1b36c36a9f64cf4
usb: gadget: uvc: rework uvcg_queue_next_buffer to uvcg_complete_buffer

commit 61aa709ca58a0dbeeb817bfa9230c1a92979f2c6 upstream.

The function uvcg_queue_next_buffer is used different than its name
suggests. The return value nextbuf is never used by any caller. This
patch reworks the function to its actual purpose, by removing the unused
code and renaming it. The function name uvcg_complete_buffer makes it
more clear that it is actually marking the current video buffer as
complete.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Link: https://lore.kernel.org/r/20220402232744.3622565-2-m.grzeschik@pengutronix.de
Cc: Dan Vacura <w36195@motorola.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/uvc_queue.c
drivers/usb/gadget/function/uvc_queue.h
drivers/usb/gadget/function/uvc_video.c