summaryrefslogtreecommitdiff
path: root/common/usb.c
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2008-09-09 16:16:20 -0500
committerAndrew Fleming-AFLEMING <afleming@freescale.com>2008-09-09 16:16:20 -0500
commit650a9e7abc44ce1ce73d6668eaf0ba2d6b8025e9 (patch)
tree30732e12d39390eda22338e98db7b8ab9025bf22 /common/usb.c
parent6cc64f9b5f69239c8b1969572b5a3a4aab7de5b9 (diff)
parent3b20fd83c73c22acfcb0c6663be747bd5c8b7011 (diff)
downloadu-boot-imx-650a9e7abc44ce1ce73d6668eaf0ba2d6b8025e9.zip
u-boot-imx-650a9e7abc44ce1ce73d6668eaf0ba2d6b8025e9.tar.gz
u-boot-imx-650a9e7abc44ce1ce73d6668eaf0ba2d6b8025e9.tar.bz2
Merge branch 'denx'
Diffstat (limited to 'common/usb.c')
-rw-r--r--common/usb.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/common/usb.c b/common/usb.c
index 9502f39..52e5964 100644
--- a/common/usb.c
+++ b/common/usb.c
@@ -126,10 +126,15 @@ int usb_init(void)
*/
int usb_stop(void)
{
- asynch_allowed=1;
- usb_started = 0;
- usb_hub_reset();
- return usb_lowlevel_stop();
+ int res = 0;
+
+ if (usb_started) {
+ asynch_allowed = 1;
+ usb_started = 0;
+ usb_hub_reset();
+ res = usb_lowlevel_stop();
+ }
+ return res;
}
/*