]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: core: Centralize device state update logic
authorKuen-Han Tsai <khtsai@google.com>
Tue, 14 Oct 2025 19:50:51 +0000 (03:50 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Oct 2025 08:58:30 +0000 (10:58 +0200)
commitc05ebd0ec91e27408767c46dd16c291cbff2213d
treeb40217e59b09501fe88e84e0cb7d5f029b17060f
parent877c80dfbf788e57a3338627899033b7007037ee
usb: core: Centralize device state update logic

Introduce a new static function, update_usb_device_state(), to
centralize the process of changing a device's state, including the
management of active_duration during suspend/resume transitions.

This change prepares for adding tracepoints, allowing tracing logic to
be added in a single, central location within the new helper function.

Signed-off-by: Kuen-Han Tsai <khtsai@google.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://patch.msgid.link/20251015-usbcore-tracing-v2-1-5a14b5b9d4e0@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/core/hub.c