staging/android: remove sync_timeline_destroy()
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>
Tue, 31 May 2016 19:59:10 +0000 (16:59 -0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Jun 2016 04:17:40 +0000 (21:17 -0700)
This function was just used by the file release function, so we just fold
its content there and remove sync_timeline_destroy().

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>
drivers/staging/android/sw_sync.c

index 1f956b99b880b0eee17469fc7fe0c7d9236f85b1..cf4de27266a495ae5a7e5ce924aa77e05ca7a051 100644 (file)
@@ -97,21 +97,6 @@ static void sync_timeline_put(struct sync_timeline *obj)
        kref_put(&obj->kref, sync_timeline_free);
 }
 
-/**
- * sync_timeline_destroy() - destroys a sync object
- * @obj:       sync_timeline to destroy
- *
- * A sync implementation should call this when the @obj is going away
- * (i.e. module unload.)  @obj won't actually be freed until all its children
- * fences are freed.
- */
-static void sync_timeline_destroy(struct sync_timeline *obj)
-{
-       smp_wmb();
-
-       sync_timeline_put(obj);
-}
-
 /**
  * sync_timeline_signal() - signal a status change on a sync_timeline
  * @obj:       sync_timeline to signal
@@ -275,7 +260,9 @@ static int sw_sync_debugfs_release(struct inode *inode, struct file *file)
 {
        struct sync_timeline *obj = file->private_data;
 
-       sync_timeline_destroy(obj);
+       smp_wmb();
+
+       sync_timeline_put(obj);
        return 0;
 }