linux/drivers/usb/gadget
Russell King (Oracle) 202ad1aaca usb: gadget: tegra-xudc: fix PM use count underflow
Upon resume from system suspend, the PM runtime core issues the
following warning:

tegra-xudc 3550000.usb: Runtime PM usage count underflow!

This is because tegra_xudc_resume() unconditionally calls
schedule_work(&xudc->usb_role_sw_work) whether or not anything has
changed, which causes tegra_xudc_device_mode_off() to be called
even when we're already in that mode.

Keep track of the current state of "device_mode", and only schedule
this work if it has changed from the hardware state on resume.

Signed-off-by: "Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>
Link: https://lore.kernel.org/r/E1uhtkH-007KDZ-JT@rmk-PC.armlinux.org.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-08-13 17:15:45 +02:00
..
function USB / Thunderbolt changes for 6.17-rc1 2025-07-29 10:17:10 -07:00
legacy functionfs, gadgetfs: use simple_recursive_removal() 2025-07-02 22:36:52 -04:00
udc usb: gadget: tegra-xudc: fix PM use count underflow 2025-08-13 17:15:45 +02:00
Kconfig usb: gadget: midi2: Reverse-select at the right place 2025-01-07 11:42:22 +01:00
Makefile usb: gadget: Makefile: remove ccflags-y 2022-03-18 12:56:08 +01:00
composite.c usb: gadget : fix use-after-free in composite_dev_cleanup() 2025-07-21 16:32:23 +02:00
config.c usb: gadget: config: Remove unused usb_gadget_config_buf 2025-06-19 12:26:48 +02:00
configfs.c usb: gadget: configfs: Fix OOB read on empty string write 2025-07-09 12:10:52 +02:00
configfs.h
epautoconf.c usb: gadget: epautoconf: Use USB API functions rather than constants 2025-05-21 13:13:22 +02:00
functions.c
u_f.c usb: gadget: function: move u_f.h to include/linux/usb/func_utils.h 2024-09-03 09:57:08 +02:00
u_os_desc.h move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
usbstring.c drivers/usb/gadget: refactor min with min_t 2024-11-13 15:09:50 +01:00