summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcin Bukat <marcin.bukat@gmail.com>2012-11-13 13:33:06 +0100
committerMarcin Bukat <marcin.bukat@gmail.com>2012-11-13 13:36:23 +0100
commitb35f82c91ff050b4405b19a3e56e9d031bf940e2 (patch)
tree0ea64cad9ebcfe73b0d6e5cdc35159ed4131617d
parent5ed6de3889a2ae285e85becdb23b9845ca79fee4 (diff)
downloadrockbox-b35f82c91ff050b4405b19a3e56e9d031bf940e2.tar.gz
rockbox-b35f82c91ff050b4405b19a3e56e9d031bf940e2.zip
HD300: Fix crash in bootloader introduced by 36281c4
Uninitialized struct scroll which is used to pass state between scrollstrip ISR and button_read_device() can bomb out whole button subsytem. Change-Id: I3b415c22cfee4181b2132cddaeff68797c7cc0ea
-rw-r--r--firmware/target/coldfire/mpio/hd300/button-hd300.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/firmware/target/coldfire/mpio/hd300/button-hd300.c b/firmware/target/coldfire/mpio/hd300/button-hd300.c
index 95de05cbcf..5c817e92bd 100644
--- a/firmware/target/coldfire/mpio/hd300/button-hd300.c
+++ b/firmware/target/coldfire/mpio/hd300/button-hd300.c
@@ -38,7 +38,10 @@ static volatile struct scroll_state_t {
38 signed char dir; 38 signed char dir;
39 long timeout; 39 long timeout;
40 bool rel; 40 bool rel;
41} scroll; 41} scroll = { .dir = BUTTON_UP,
42 .timeout = SLIDER_REL_TIMEOUT,
43 .rel = false,
44 };
42 45
43static inline void disable_scrollstrip_interrupts(void) 46static inline void disable_scrollstrip_interrupts(void)
44{ 47{