]> git.baikalelectronics.ru Git - kernel.git/commit
usb: gadget: udc-core: fix asymmetric calls in remove_driver
authorKishon Vijay Abraham I <kishon@ti.com>
Wed, 21 Mar 2012 16:04:30 +0000 (21:34 +0530)
committerFelipe Balbi <balbi@ti.com>
Tue, 10 Apr 2012 16:11:49 +0000 (19:11 +0300)
commit3c2f4a38eb54f3e78316e2541368df44ceba93cb
tree48fc0cf66f6ccb87b0955ce83431181d85534031
parent894fb78c66aa2aad2f3bdbf9cf77d8530af02e7a
usb: gadget: udc-core: fix asymmetric calls in remove_driver

During modprobe of gadget driver, pullup is called after
udc_start. In order to make the exit path symmetric when
removing a gadget driver, call pullup before ->udc_stop.

This is needed to avoid issues with PM where udc_stop
disables the module completely (put IP in reset state,
cut functional and interface clocks, and so on), which
prevents us from accessing the IP's address space,
thus creating the possibility of an abort exception
when we try to access IP's address space after clocks
are off.

Cc: stable@vger.kernel.org
Signed-off-by: Partha Basak <p-basak2@ti.com>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/gadget/udc-core.c