summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINSUN PYO <insun.pyo@samsung.com>2017-09-11 13:21:42 +0900
committerINSUN PYO <insun.pyo@samsung.com>2017-09-11 22:28:55 +0000
commitec8c73e41a57a6b519c730ec3461d83a2363be7e (patch)
tree94dccae8c9379a50f427d494d1aa9bda85a80578
parent0c663020fc164041674d4de91a87588d796059c2 (diff)
downloaddevice-manager-plugin-artik-ec8c73e41a57a6b519c730ec3461d83a2363be7e.tar.gz
device-manager-plugin-artik-ec8c73e41a57a6b519c730ec3461d83a2363be7e.tar.bz2
device-manager-plugin-artik-ec8c73e41a57a6b519c730ec3461d83a2363be7e.zip
remove build warningsubmit/tizen/20170911.223142
Touchscreen_init calls the open function of hal at the beginning of the boot with the call stack below. So the open function of hal is never called at the same time in multi-thread. Therefore, we can use safely readdir in deviced. 0 touchscreen_init 1 0x2a00b02c in devices_init (data=0x0) at /usr/src/debug/deviced-2.0.0/src/core/devices.c:102 2 0x2a00e424 in deviced_main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/deviced-2.0.0/src/core/main.c:93 3 0x2a0078f4 in main (argc=1, argv=0xbefffe64) at /usr/src/debug/deviced-2.0.0/src/core/main.c:123 Signed-off-by: INSUN PYO <insun.pyo@samsung.com> Change-Id: Ieb4ded94379c01592cabd85a5ed6eb525042bc97 (cherry picked from commit 4a8b1ec8da47eb05d58d1b67fcb678cc7755d27e)
-rwxr-xr-xhw/touchscreen/touchscreen.c3
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,