video: adf: Cleanup sw_sync timeline at adf_device_destroy
authorJonathan Hamilton <jonathan.hamilton@imgtec.com>
Thu, 17 Jul 2014 22:54:44 +0000 (15:54 -0700)
committerJonathan Hamilton <jonathan.hamilton@imgtec.com>
Thu, 17 Jul 2014 23:02:20 +0000 (16:02 -0700)
If a sw_sync timeline was created by ADF (for drivers that do not implement
ops->complete_fence) we should clean it up when the ADF device is
destroyed.

Change-Id: Idd90180fcae56a87111f7d12bdd80190756a6b80
Signed-off-by: Jonathan Hamilton <jonathan.hamilton@imgtec.com>
drivers/video/adf/adf.c

index 231881c2b355ef080aa1240079e0d9e1eb416ba5..42c30c05826a27689b5d61ae993294595988c8f3 100644 (file)
@@ -613,6 +613,10 @@ void adf_device_destroy(struct adf_device *dev)
        }
        mutex_destroy(&dev->post_lock);
        mutex_destroy(&dev->client_lock);
+
+       if (dev->timeline)
+               sync_timeline_destroy(&dev->timeline->obj);
+
        adf_obj_destroy(&dev->base, &adf_devices);
 }
 EXPORT_SYMBOL(adf_device_destroy);