diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-16 14:11:51 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-16 14:37:01 -0400 |
commit | c6d2a0358f221be41450503b45a4f14db14bf690 (patch) | |
tree | 80af5b360d9b54238a1247d93215d2a4f2c5a556 /firmware/target/hosted/xduoo/button-xduoo.c | |
parent | 1a76bc403e647ac40f2218dd3808ce8b3f9a80d9 (diff) | |
download | rockbox-c6d2a0358f221be41450503b45a4f14db14bf690.tar.gz rockbox-c6d2a0358f221be41450503b45a4f14db14bf690.zip |
hosted: open input device as read-only.
Change-Id: I4dcd98f45f41fe06a0a75a2a0dd45c753c2cf365
Diffstat (limited to 'firmware/target/hosted/xduoo/button-xduoo.c')
-rw-r--r-- | firmware/target/hosted/xduoo/button-xduoo.c | 4 |
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) | |||
76 | 76 | ||
77 | void button_init_device(void) | 77 | void button_init_device(void) |
78 | { | 78 | { |
79 | const char * const input_devs[] = { | 79 | const char * const input_devs[NR_POLL_DESC] = { |
80 | "/dev/input/event0", | 80 | "/dev/input/event0", |
81 | "/dev/input/event1", | 81 | "/dev/input/event1", |
82 | "/dev/input/event2" | 82 | "/dev/input/event2" |
@@ -84,7 +84,7 @@ void button_init_device(void) | |||
84 | 84 | ||
85 | for(int i = 0; i < NR_POLL_DESC; i++) | 85 | for(int i = 0; i < NR_POLL_DESC; i++) |
86 | { | 86 | { |
87 | int fd = open(input_devs[i], O_RDWR | O_CLOEXEC); | 87 | int fd = open(input_devs[i], O_RDONLY | O_CLOEXEC); |
88 | 88 | ||
89 | if(fd < 0) | 89 | if(fd < 0) |
90 | { | 90 | { |