]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
usb: roles: add lockdep class key to struct usb_role_switch
authorAmit Sunil Dhamne <amitsd@google.com>
Thu, 22 Aug 2024 22:37:15 +0000 (15:37 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 25 Aug 2024 11:45:56 +0000 (13:45 +0200)
commitfc88bb11617978fb3fcfcc697fd5c9d2dae9c4a3
tree94341ec9cd6edaa455d0108311ee162f7a20e99c
parent4333dbd9798d470d0c81608bb44bb7c8fd7f7948
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.

Signed-off-by: Amit Sunil Dhamne <amitsd@google.com>
Reviewed-by: Badhri Jagan Sridharan <badhri@google.com>
Link: https://lore.kernel.org/r/20240822223717.253433-1-amitsd@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/roles/class.c