diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-12-24 00:37:27 -0500 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-12-24 00:40:01 -0500 |
commit | b5e6c30a61047e89f6cb1299a81453a80b79cc37 (patch) | |
tree | 4582b58a3ffcc5d8263a76396c8f160a2876661c | |
parent | c842a136519e1f8ef81cd7e4a815690825193baa (diff) | |
download | rockbox-b5e6c30a61047e89f6cb1299a81453a80b79cc37.tar.gz rockbox-b5e6c30a61047e89f6cb1299a81453a80b79cc37.zip |
USB: Reset poweroff timer for all USB events
Without this, if a device is left plugged in and idle, unplugging it will
trigger an immediate shutdown.
Change-Id: I65caaa0c1473562ec5d0bb776b01d4d222d69965
-rw-r--r-- | firmware/usb.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/usb.c b/firmware/usb.c index c27af4a378..05597dff9b 100644 --- a/firmware/usb.c +++ b/firmware/usb.c | |||
@@ -41,6 +41,7 @@ | |||
41 | #endif | 41 | #endif |
42 | #include "logf.h" | 42 | #include "logf.h" |
43 | #include "screendump.h" | 43 | #include "screendump.h" |
44 | #include "powermgmt.h" | ||
44 | 45 | ||
45 | #ifndef BOOTLOADER | 46 | #ifndef BOOTLOADER |
46 | #include "misc.h" | 47 | #include "misc.h" |
@@ -436,6 +437,8 @@ static void NORETURN_ATTR usb_thread(void) | |||
436 | { | 437 | { |
437 | queue_wait(&usb_queue, &ev); | 438 | queue_wait(&usb_queue, &ev); |
438 | 439 | ||
440 | reset_poweroff_timer(); /* Any USB event counts */ | ||
441 | |||
439 | switch(ev.id) | 442 | switch(ev.id) |
440 | { | 443 | { |
441 | /*** Main USB thread duties ***/ | 444 | /*** Main USB thread duties ***/ |