summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/xduoo/button-xduoo.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/xduoo/button-xduoo.c')
-rw-r--r--firmware/target/hosted/xduoo/button-xduoo.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/firmware/target/hosted/xduoo/button-xduoo.c b/firmware/target/hosted/xduoo/button-xduoo.c
index 3dc1bdc13a..67cb9a6c46 100644
--- a/firmware/target/hosted/xduoo/button-xduoo.c
+++ b/firmware/target/hosted/xduoo/button-xduoo.c
@@ -76,7 +76,7 @@ static int button_map(int keycode)
void button_init_device(void)
{
- const char * const input_devs[] = {
+ const char * const input_devs[NR_POLL_DESC] = {
"/dev/input/event0",
"/dev/input/event1",
"/dev/input/event2"
@@ -84,7 +84,7 @@ void button_init_device(void)
for(int i = 0; i < NR_POLL_DESC; i++)
{
- int fd = open(input_devs[i], O_RDWR | O_CLOEXEC);
+ int fd = open(input_devs[i], O_RDONLY | O_CLOEXEC);
if(fd < 0)
{