usb: gadget: define free_ep_req as universal function
authorFelipe F. Tonello <eu@felipetonello.com>
Tue, 10 Nov 2015 17:52:05 +0000 (17:52 +0000)
committerFelipe Balbi <balbi@ti.com>
Tue, 15 Dec 2015 15:12:41 +0000 (09:12 -0600)
commit079fe5a6da616891cca1a26e803e1df2a87e9ae5
tree8de7bad5ce23cdc9837c8c697b608bc8533c909f
parentbc1d3cdc9c3cbbd9040da8c53237e177c38048b0
usb: gadget: define free_ep_req as universal function

This function is shared between gadget functions, so this avoid unnecessary
duplicated code and potentially avoid memory leaks.

Reviewed-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe F. Tonello <eu@felipetonello.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/function/f_midi.c
drivers/usb/gadget/function/f_sourcesink.c
drivers/usb/gadget/function/g_zero.h
drivers/usb/gadget/u_f.c
drivers/usb/gadget/u_f.h