diff options
-rwxr-xr-x | hw/touchscreen/touchscreen.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/hw/touchscreen/touchscreen.c b/hw/touchscreen/touchscreen.c index 1d5be64..fe3c97e 100755 --- a/hw/touchscreen/touchscreen.c +++ b/hw/touchscreen/touchscreen.c @@ -40,7 +40,6 @@ static char *touchscreen_node; static int touchscreen_probe(void) { DIR *d; - struct dirent entry; struct dirent *dir; char buf[PATH_MAX]; int val, ret = -ENOTSUP; @@ -49,7 +48,7 @@ static int touchscreen_probe(void) if (!d) return -errno; - while (readdir_r(d, &entry, &dir) == 0 && dir != NULL) { + while ((dir = readdir(d))) { if (dir->d_name[0] == '.') continue; snprintf(buf, sizeof(buf), "%s%s%s", INPUT_PATH, |