summaryrefslogtreecommitdiffstats
path: root/firmware/target/coldfire
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 /firmware/target/coldfire
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
Diffstat (limited to 'firmware/target/coldfire')
-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 {
signed char dir;
long timeout;
bool rel;
-} scroll;
+} scroll = { .dir = BUTTON_UP,
+ .timeout = SLIDER_REL_TIMEOUT,
+ .rel = false,
+ };
static inline void disable_scrollstrip_interrupts(void)
{