From: Jonathan Hamilton Date: Thu, 17 Jul 2014 22:54:44 +0000 (-0700) Subject: video: adf: Cleanup sw_sync timeline at adf_device_destroy X-Git-Tag: firefly_0821_release~2958^2~209 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9f577b18243925d419a8e167c4a8a70449afec70;p=firefly-linux-kernel-4.4.55.git video: adf: Cleanup sw_sync timeline at adf_device_destroy 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 --- diff --git a/drivers/video/adf/adf.c b/drivers/video/adf/adf.c index 231881c2b355..42c30c05826a 100644 --- a/drivers/video/adf/adf.c +++ b/drivers/video/adf/adf.c @@ -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);