Commit b0b30406 authored by Amit Sunil Dhamne's avatar Amit Sunil Dhamne Committed by Bart Van Assche
Browse files

BACKPORT: usb: roles: add lockdep class key to struct usb_role_switch



There can be multiple role switch devices running on a platform. Given
that lockdep is not capable of differentiating between locks of
different instances, false positive warnings for circular locking are
reported. To prevent this, register unique lockdep key for each of the
individual instances.

Change-Id: I087906873262e6c5c7425d02d4281c8ab1b01809
Signed-off-by: default avatarAmit Sunil Dhamne <amitsd@google.com>
Reviewed-by: default avatarBadhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20240822223717.253433-1-amitsd@google.com


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Bug: 357676850
(cherry picked from commit fc88bb11)
[ bvanassche: included if (IS_ERR_OR_NULL(sw)) inversion ]
Signed-off-by: default avatarBart Van Assche <bvanassche@acm.org>
parent 8631bd44
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment