staging/android: bring struct sync_pt back
Move the list_head members from sync_pt to struct fence was a mistake,
they will not be used by struct fence as planned before, so here we create
sync_pt again to bring the list heads back.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/android/sync_debug.c b/drivers/staging/android/sync_debug.c
index cb0f888..703f198 100644
--- a/drivers/staging/android/sync_debug.c
+++ b/drivers/staging/android/sync_debug.c
@@ -140,9 +140,9 @@
spin_lock_irqsave(&obj->child_list_lock, flags);
list_for_each(pos, &obj->child_list_head) {
- struct fence *fence =
- container_of(pos, struct fence, child_list);
- sync_print_fence(s, fence, false);
+ struct sync_pt *pt =
+ container_of(pos, struct sync_pt, child_list);
+ sync_print_fence(s, &pt->base, false);
}
spin_unlock_irqrestore(&obj->child_list_lock, flags);
}
@@ -240,7 +240,7 @@
{
int fd = get_unused_fd_flags(O_CLOEXEC);
int err;
- struct fence *fence;
+ struct sync_pt *pt;
struct sync_file *sync_file;
struct sw_sync_create_fence_data data;
@@ -252,15 +252,15 @@
goto err;
}
- fence = sync_pt_create(obj, sizeof(*fence), data.value);
- if (!fence) {
+ pt = sync_pt_create(obj, sizeof(*pt), data.value);
+ if (!pt) {
err = -ENOMEM;
goto err;
}
- sync_file = sync_file_create(fence);
+ sync_file = sync_file_create(&pt->base);
if (!sync_file) {
- fence_put(fence);
+ fence_put(&pt->base);
err = -ENOMEM;
goto err;
}