usb: otg: nop: fix oops triggered by otg_register_notifier
authorMing Lei <tom.leiming@gmail.com>
Tue, 4 Jan 2011 12:21:32 +0000 (20:21 +0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 23 Jan 2011 02:32:55 +0000 (18:32 -0800)
commit20831ad23978d0543b0b23128621b6d8ee7757f1
treef8da021c6e5e05e71067c757c060525284d76448
parent0cdfb819b6a97e79c7a0aa0c471cd7000367103b
usb: otg: nop: fix oops triggered by otg_register_notifier

This patch adds BLOCKING_INIT_NOTIFIER_HEAD in nop_usb_xceiv_probe,
so that we can avoid oops caused by uninitialized
nop->otg.notifier.rwsem which will be touched in otg_register_notifier
path.

Reported-by: Gupta, Ajay Kumar <ajay.gupta@ti.com>
Tested-by: Gupta, Ajay Kumar <ajay.gupta@ti.com>
Cc: Balbi, Felipe <balbi@ti.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Ming Lei <tom.leiming@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/otg/nop-usb-xceiv.c