static int touchscreen_probe(void)
{
DIR *d;
- struct dirent entry;
struct dirent *dir;
char buf[PATH_MAX];
int val, ret = -ENOTSUP;
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,