twx-linux/include/linux/usb
Kuen-Han Tsai bfb1d99d96 usb: gadget: Store endpoint pointer in usb_request
Gadget function drivers often have goto-based error handling in their
bind paths, which can be bug-prone. Refactoring these paths to use
__free() scope-based cleanup is desirable, but currently blocked.

The blocker is that usb_ep_free_request(ep, req) requires two
parameters, while the __free() mechanism can only pass a pointer to the
request itself.

Store an endpoint pointer in the struct usb_request. The pointer is
populated centrally in usb_ep_alloc_request() on every successful
allocation, making the request object self-contained.

Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
Link: https://lore.kernel.org/r/20250916-ready-v1-1-4997bf277548@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20250916-ready-v1-1-4997bf277548@google.com
2025-09-17 12:44:53 +02:00
..
audio-v2.h
audio-v3.h
audio.h
c67x00.h
ccid.h
cdc_ncm.h net: usb: cdc-ncm: check for filtering capability 2025-07-21 16:59:26 -07:00
cdc-wdm.h
cdc.h
ch9.h
chipidea.h usb: chipidea: udc: add CI_HDRC_CONTROLLER_PULLUP_EVENT event 2025-06-19 12:28:25 +02:00
composite.h usb: gadget: Remove unused usb_remove_config 2025-06-19 12:26:48 +02:00
ehci_def.h
ehci_pdriver.h
ehci-dbgp.h
ezusb.h
func_utils.h
functionfs.h
g_hid.h
gadget_configfs.h
gadget.h usb: gadget: Store endpoint pointer in usb_request 2025-09-17 12:44:53 +02:00
hcd.h
input.h
iowarrior.h
irda.h
isp116x.h
isp1301.h
isp1362.h
ljca.h
m66592.h
mctp-usb.h usb: Add base USB MCTP definitions 2025-02-21 16:45:21 -08:00
midi-v2.h
musb-ux500.h
musb.h usb: musb: Constify struct musb_fifo_cfg 2025-02-03 16:29:53 +01:00
net2280.h
of.h
ohci_pdriver.h
onboard_dev.h
otg-fsm.h
otg.h
pd_ado.h
pd_bdo.h
pd_ext_sdb.h
pd_vdo.h
pd.h usb: typec: tcpm: Add new AMS for Get_Revision response 2024-12-24 08:56:04 +01:00
phy_companion.h
phy.h usb: phy: Remove API devm_usb_put_phy() 2025-01-13 06:12:09 +01:00
quirks.h
r8a66597.h
r8152.h r8152: add vendor/device ID pair for Dell Alienware AW1022z 2025-02-10 17:57:35 -08:00
renesas_usbhs.h
rndis_host.h
role.h
rzv2m_usb3drd.h
serial.h
sl811.h
storage.h usb: storage: add a macro for the upper limit of max LUN 2024-12-04 16:33:54 +01:00
tcpci.h
tcpm.h usb: typec: tcpci: Prevent Sink disconnection before vPpsShutdown in SPR PPS 2025-01-17 12:40:20 +01:00
tegra_usb_phy.h usb: phy: tegra: Remove unused functions 2025-06-19 12:26:32 +02:00
typec_altmode.h
typec_dp.h usb: typec: altmodes/displayport: do not index invalid pin_assignments 2025-06-24 15:42:55 +01:00
typec_mux.h
typec_retimer.h
typec_tbt.h usb: typec: Add driver for Thunderbolt 3 Alternate Mode 2024-12-24 08:56:05 +01:00
typec.h usb: typec: Make active on port altmode writable 2024-12-24 08:56:05 +01:00
uas.h
ulpi.h usb: ulpi: Remove unused otg_ulpi_create 2025-03-03 10:23:35 +01:00
usb338x.h
usb_phy_generic.h
usbnet.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-07-26 11:49:45 -07:00
uvc.h media: uvcvideo: Auto-set UVC_QUIRK_MSXU_META 2025-07-11 19:27:30 +02:00
webusb.h
xhci-dbgp.h
xhci-sideband.h usb: host: xhci: Notify xHCI sideband on transfer ring free 2025-04-11 13:02:30 +02:00