X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=inline;f=common%2Fusb.c;h=4f7c520b344d7676d20a604be5c63d96b672efac;hb=8d6b73202c65f40f88ac27f5e5d2203fe6ae3f1d;hp=44a435af6e67ed7de122a55e770c3d09f7ec95c5;hpb=c65715de780945950d570e2b69f94e0b186f04b4;p=u-boot diff --git a/common/usb.c b/common/usb.c index 44a435af6e..4f7c520b34 100644 --- a/common/usb.c +++ b/common/usb.c @@ -145,10 +145,14 @@ int usb_stop(void) /* * disables the asynch behaviour of the control message. This is used for data * transfers that uses the exclusiv access to the control and bulk messages. + * Returns the old value so it can be restored later. */ -void usb_disable_asynch(int disable) +int usb_disable_asynch(int disable) { + int old_value = asynch_allowed; + asynch_allowed = !disable; + return old_value; }