@@ -184,7 +184,7 @@ static long sw_sync_ioctl_create_fence(struct sw_sync_timeline *obj,
}
data.name[sizeof(data.name) - 1] = '\0';
- fence = sync_fence_create(data.name, pt);
+ fence = sync_fence_create(data.name, &pt->base);
if (fence == NULL) {
sync_pt_free(pt);
err = -ENOMEM;
@@ -188,7 +188,7 @@ static void fence_check_cb_func(struct fence *f, struct fence_cb *cb)
}
/* TODO: implement a create which takes more that one sync_pt */
-struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt)
+struct sync_fence *sync_fence_create(const char *name, struct fence *pt)
{
struct sync_fence *fence;
@@ -199,10 +199,10 @@ struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt)
fence->num_fences = 1;
atomic_set(&fence->status, 1);
- fence_get(&pt->base);
- fence->cbs[0].sync_pt = &pt->base;
+ fence_get(pt);
+ fence->cbs[0].sync_pt = pt;
fence->cbs[0].fence = fence;
- if (fence_add_callback(&pt->base, &fence->cbs[0].cb,
+ if (fence_add_callback(pt, &fence->cbs[0].cb,
fence_check_cb_func))
atomic_dec(&fence->status);
@@ -252,7 +252,7 @@ void sync_pt_free(struct sync_pt *pt);
* Creates a fence containg @pt. Once this is called, the fence takes
* ownership of @pt.
*/
-struct sync_fence *sync_fence_create(const char *name, struct sync_pt *pt);
+struct sync_fence *sync_fence_create(const char *name, struct fence *fence);
/*
* API for sync_fence consumers