summaryrefslogtreecommitdiff
path: root/firmware/powermgmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/powermgmt.c')
-rw-r--r--firmware/powermgmt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/firmware/powermgmt.c b/firmware/powermgmt.c
index b135a291d0..c80e711a16 100644
--- a/firmware/powermgmt.c
+++ b/firmware/powermgmt.c
@@ -454,10 +454,12 @@ static int runcurrent(void)
#endif /* MEM == 8 */
if(usb_inserted()
-#if defined(HAVE_USB_POWER) && (CURRENT_USB < CURRENT_NORMAL)
+#if defined(HAVE_USB_POWER)
+ #if (CURRENT_USB < CURRENT_NORMAL)
|| usb_powered()
-#else
+ #else
&& !usb_powered()
+ #endif
#endif
)
{