]> git.karo-electronics.de Git - karo-tx-linux.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)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Apr 2012 17:16:51 +0000 (10:16 -0700)
commitfa0dc144ce618ddcbbe4047e9c1c61b44cee9594
treef41b2a8714581fe92e7540947d6097bb52d2da41
parent10dea522a023d442069362eb0aa389e0c5c04c25
usb: gadget: udc-core: fix asymmetric calls in remove_driver

commit 8ae8090c82eb407267001f75b3d256b3bd4ae691 upstream.

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.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/udc-core.c