summaryrefslogtreecommitdiff
path: root/io-module
diff options
context:
space:
mode:
Diffstat (limited to 'io-module')
-rw-r--r--io-module/mts_io.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/io-module/mts_io.c b/io-module/mts_io.c
index 9f27af2..728e39b 100644
--- a/io-module/mts_io.c
+++ b/io-module/mts_io.c
@@ -1212,12 +1212,15 @@ static void blink_callback(struct work_struct *ignored)
if (vpid) {
if (reset_pressed) {
reset_count++;
- } else if (reset_count > 0 && reset_count < RESET_HOLD_COUNT) {
- kill_pid(vpid, reset_short_signal, 1);
- reset_count = 0;
- } else if (reset_count >= RESET_HOLD_COUNT && reset_count < RESET_LONG_HOLD_COUNT) {
- reset_count = 0;
- kill_pid(vpid, reset_long_signal, 1);
+ } else {
+ //Reset button has not been pressed
+ if (reset_count > 0 && reset_count < RESET_HOLD_COUNT) {
+ kill_pid(vpid, reset_short_signal, 1);
+ reset_count = 0;
+ } else if (reset_count >= RESET_HOLD_COUNT && reset_count < RESET_LONG_HOLD_COUNT) {
+ reset_count = 0;
+ kill_pid(vpid, reset_long_signal, 1);
+ }
}
if (reset_count >= RESET_LONG_HOLD_COUNT) {