aboutsummaryrefslogtreecommitdiff
path: root/rmi4update
diff options
context:
space:
mode:
authorVincent Huang <vincent.huang@tw.synaptics.com>2018-09-05 16:20:36 +0800
committerAndrew Duggan <aduggan@synaptics.com>2018-09-06 21:21:37 -0700
commit876b06ba6e99b86a307e5fa322084ebcc8718587 (patch)
tree6fc743c55d4d21f18a4aef8ca3586c9336ffa488 /rmi4update
parent459d02fc2c6d706cd15eb56528cb5278b6b403ff (diff)
downloadrmi4utils-876b06ba6e99b86a307e5fa322084ebcc8718587.tar.gz
Workaround to check event maximum value
Diffstat (limited to 'rmi4update')
-rw-r--r--rmi4update/rmi4update.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/rmi4update/rmi4update.cpp b/rmi4update/rmi4update.cpp
index 0b2bd0d..7bb4f4b 100644
--- a/rmi4update/rmi4update.cpp
+++ b/rmi4update/rmi4update.cpp
@@ -23,7 +23,8 @@
#include <string.h>
#include <stdlib.h>
#include <errno.h>
-
+#include <fcntl.h>
+#include <linux/input.h>
#include "rmi4update.h"
#define RMI_F34_QUERY_SIZE 7
@@ -242,7 +243,12 @@ int RMI4Update::UpdateFirmware(bool force, bool performLockdown)
reset:
m_device.Reset();
+rebind:
m_device.RebindDriver();
+ if(!m_device.CheckABSEvent())
+ {
+ goto rebind;
+ }
return rc;
}