summaryrefslogtreecommitdiff
path: root/firmware/target/hosted/agptek
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/hosted/agptek')
-rw-r--r--firmware/target/hosted/agptek/button-agptek.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/target/hosted/agptek/button-agptek.c b/firmware/target/hosted/agptek/button-agptek.c
index 83953e0dab..2c84a50405 100644
--- a/firmware/target/hosted/agptek/button-agptek.c
+++ b/firmware/target/hosted/agptek/button-agptek.c
@@ -70,14 +70,14 @@ static int button_map(int keycode)
70 70
71void button_init_device(void) 71void button_init_device(void)
72{ 72{
73 const char * const input_devs[] = { 73 const char * const input_devs[NR_POLL_DESC] = {
74 "/dev/input/event0", 74 "/dev/input/event0",
75 "/dev/input/event1" 75 "/dev/input/event1"
76 }; 76 };
77 77
78 for(int i = 0; i < NR_POLL_DESC; i++) 78 for(int i = 0; i < NR_POLL_DESC; i++)
79 { 79 {
80 int fd = open(input_devs[i], O_RDWR | O_CLOEXEC); 80 int fd = open(input_devs[i], O_RDONLY | O_CLOEXEC);
81 81
82 if(fd < 0) 82 if(fd < 0)
83 { 83 {
@@ -146,4 +146,3 @@ void button_close_device(void)
146 close(poll_fds[i].fd); 146 close(poll_fds[i].fd);
147 } 147 }
148} 148}
149