Commits
Peter Chen committed fd9034a365f
MLK-16221-6 usb: cdns3: gadget: fix non-initialized spinlock warning The below warning is showed if we open lockdep debug, fix it by initializing spinlock before using it. [ 192.159535] INFO: trying to register non-static key. [ 192.164507] the code is fine but needs lockdep annotation. [ 192.169996] turning off the locking correctness validator. [ 192.175485] CPU: 1 PID: 2831 Comm: modprobe Not tainted 4.9.11-03045-g39aab30 #514 [ 192.183054] Hardware name: Freescale i.MX8QXP LPDDR4 ARM2 (DT) [ 192.188884] Call trace: [ 192.191348] [<ffff200008089234>] dump_backtrace+0x0/0x1e0 [ 192.196751] [<ffff200008089428>] show_stack+0x14/0x1c [ 192.201808] [<ffff2000084046f4>] dump_stack+0xb0/0xec [ 192.206865] [<ffff200008107570>] register_lock_class+0x510/0x538 [ 192.212873] [<ffff20000810b7c4>] __lock_acquire+0x84/0x6f0 [ 192.218363] [<ffff20000810c34c>] lock_acquire+0x68/0xc8 [ 192.223596] [<ffff200008bfe1f4>] _raw_spin_lock_irqsave+0x50/0x68 [ 192.229694] [<ffff200008857528>] usb_ss_gadget_udc_start+0x38/0x1b0 [ 192.235966] [<ffff20000889da8c>] udc_bind_to_driver+0xcc/0x11c [ 192.241803] [<ffff20000889e0e4>] usb_gadget_probe_driver+0xa4/0x150 [ 192.248077] [<ffff2000088983a8>] usb_composite_probe+0xb8/0xd8 [ 192.253923] [<ffff200000ce8018>] msg_init+0x18/0x1000 [g_mass_storage] [ 192.260456] [<ffff200008083960>] do_one_initcall+0x38/0x12c [ 192.266033] [<ffff200008187764>] do_init_module+0x98/0x214 [ 192.271523] [<ffff2000081465fc>] load_module+0x1014/0x10f0 [ 192.277012] [<ffff200008146970>] SyS_finit_module+0xc8/0xd4 [ 192.282590] [<ffff20000808374c>] __sys_trace_return+0x0/0x4 Signed-off-by: Peter Chen <peter.chen@nxp.com> (cherry picked from commit 020811d77f5da781a579ed28bce6789603826ce8)