From: Jarkko Nikula Date: Tue, 30 Nov 2010 15:58:25 +0000 (+0200) Subject: usb: otg: twl4030-usb: Fix unbalanced regulator disables at module removal X-Git-Tag: v2.6.38-rc1~465^2~11^2~40 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c3d6450e741da08c3bc2e2ba06d743c27540abac;p=pandora-kernel.git usb: otg: twl4030-usb: Fix unbalanced regulator disables at module removal Function twl4030_usb_remove can cause unbalanced regulator disables in twl4030_phy_power if the cable is not connected. Regulator enable/disable calls are in balance only if the twl4030_phy_resume was called prior the twl4030_usb_remove, that is, the cable was connected. Fix this by checking the 'asleep' variable in twl4030_usb_remove since that variable is used to check state in other functions. Signed-off-by: Jarkko Nikula Cc: Felipe Balbi Signed-off-by: Greg Kroah-Hartman --- Reading git-diff-tree failed