summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustavo Padovan2016-06-10 14:51:29 -0500
committerDmitry Shmidt2017-01-17 16:28:45 -0600
commitffc687baad033ecc96f6c560b205fea61afe9e41 (patch)
tree2f361fc5832adc9145a21dbab1bb5f88d4f8edfd /libsync/sync.c
parent6786575d42e78c8faa51393871eb958d87d57e08 (diff)
downloadplatform-system-core-ffc687baad033ecc96f6c560b205fea61afe9e41.tar.gz
platform-system-core-ffc687baad033ecc96f6c560b205fea61afe9e41.tar.xz
platform-system-core-ffc687baad033ecc96f6c560b205fea61afe9e41.zip
libsync: open new location of sw_sync file
sw_sync file for debug was moved to debugfs. Try to open it and if it fails try to open /dev/sw_sync. Test: Sync unit tests still passes. Change-Id: Ie078fbc2eb5294f28b916a9e65b7fcd3a18a8580 hange-Id: I216874964368d939bed2779d98cd89e527a57d45
Diffstat (limited to 'libsync/sync.c')
-rw-r--r--libsync/sync.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/libsync/sync.c b/libsync/sync.c
index fff62e77c..5946096b0 100644
--- a/libsync/sync.c
+++ b/libsync/sync.c
@@ -101,7 +101,13 @@ void sync_fence_info_free(struct sync_fence_info_data *info)
101 101
102int sw_sync_timeline_create(void) 102int sw_sync_timeline_create(void)
103{ 103{
104 return open("/dev/sw_sync", O_RDWR); 104 int ret;
105
106 ret = open("/sys/kernel/debug/sync/sw_sync", O_RDWR);
107 if (ret < 0)
108 ret = open("/dev/sw_sync", O_RDWR);
109
110 return ret;
105} 111}
106 112
107int sw_sync_timeline_inc(int fd, unsigned count) 113int sw_sync_timeline_inc(int fd, unsigned count)