drm/ttm: use cancel_delayed_work_sync() in ttm_bo
Make ttm_bo::ttm_bo_device_release call cancel_delayed_work_sync() instead of calling cancel_delayed_work() followed by flush_scheduled_work(). This is to prepare for the deprecation and removal of flush_scheduled_work(). Signed-off-by: Tejun Heo <tj@kernel.org> Cc:: Thomas Hellstrom <thellstrom@vmware.com> Cc:: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
404437efc7
commit
f094cfc6c3
1 changed files with 1 additions and 2 deletions
|
@ -1472,8 +1472,7 @@ int ttm_bo_device_release(struct ttm_bo_device *bdev)
|
||||||
list_del(&bdev->device_list);
|
list_del(&bdev->device_list);
|
||||||
mutex_unlock(&glob->device_list_mutex);
|
mutex_unlock(&glob->device_list_mutex);
|
||||||
|
|
||||||
if (!cancel_delayed_work(&bdev->wq))
|
cancel_delayed_work_sync(&bdev->wq);
|
||||||
flush_scheduled_work();
|
|
||||||
|
|
||||||
while (ttm_bo_delayed_delete(bdev, true))
|
while (ttm_bo_delayed_delete(bdev, true))
|
||||||
;
|
;
|
||||||
|
|
Loading…
Reference in a new issue