mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
usb: renesas_usbhs: gadget: fix spin_lock_init() for &uep->lock
[ Upstream commit14a8d4bfc2] This patch fixes an issue that the spin_lock_init() is not called for almost all pipes. Otherwise, the lockdep output the following message when we connect a usb cable using g_ncm: INFO: trying to register non-static key. the code is fine but needs lockdep annotation. turning off the locking correctness validator. Reported-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> Fixes:b8b9c974af("usb: renesas_usbhs: gadget: disable all eps when the driver stops") Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: Kazuya Mizuguchi <kazuya.mizuguchi.ks@renesas.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
3dde6c974c
commit
3dd952b45b
@@ -1085,7 +1085,6 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
|
||||
ret = -ENOMEM;
|
||||
goto usbhs_mod_gadget_probe_err_gpriv;
|
||||
}
|
||||
spin_lock_init(&uep->lock);
|
||||
|
||||
gpriv->transceiver = usb_get_phy(USB_PHY_TYPE_UNDEFINED);
|
||||
dev_info(dev, "%stransceiver found\n",
|
||||
@@ -1135,6 +1134,7 @@ int usbhs_mod_gadget_probe(struct usbhs_priv *priv)
|
||||
uep->ep.name = uep->ep_name;
|
||||
uep->ep.ops = &usbhsg_ep_ops;
|
||||
INIT_LIST_HEAD(&uep->ep.ep_list);
|
||||
spin_lock_init(&uep->lock);
|
||||
|
||||
/* init DCP */
|
||||
if (usbhsg_is_dcp(uep)) {
|
||||
|
||||
Reference in New Issue
Block a user