Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffc687ba authored by Gustavo Padovan's avatar Gustavo Padovan Committed by Dmitry Shmidt
Browse files

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
parent 6786575d
Loading
Loading
Loading
Loading
+7 −1
Original line number Diff line number Diff line
@@ -101,7 +101,13 @@ void sync_fence_info_free(struct sync_fence_info_data *info)

int sw_sync_timeline_create(void)
{
    return open("/dev/sw_sync", O_RDWR);
    int ret;

    ret = open("/sys/kernel/debug/sync/sw_sync", O_RDWR);
    if (ret < 0)
        ret = open("/dev/sw_sync", O_RDWR);

    return ret;
}

int sw_sync_timeline_inc(int fd, unsigned count)