drm/msm/dpu: use kthread_destroy_worker to release msm workers
authorJeykumar Sankaran <jsanka@codeaurora.org>
Fri, 14 Dec 2018 23:57:51 +0000 (15:57 -0800)
committerSean Paul <seanpaul@chromium.org>
Fri, 1 Feb 2019 15:35:55 +0000 (10:35 -0500)
use kthread_destroy_worker to destroy workers and
release their associated kthreads.

changes in v3:
- introduced in the series
changes in v4:
- none
changes in v5:
- none

Signed-off-by: Jeykumar Sankaran <jsanka@codeaurora.org>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
drivers/gpu/drm/msm/msm_drv.c

index d2cdc7b553feb4dd8b3864dfa69c3bad3502c273..5f859653442de924fe5e996c0a100ead32d53e05 100644 (file)
@@ -291,14 +291,12 @@ static int msm_drm_uninit(struct device *dev)
        /* clean up display commit/event worker threads */
        for (i = 0; i < priv->num_crtcs; i++) {
                if (priv->disp_thread[i].thread) {
-                       kthread_flush_worker(&priv->disp_thread[i].worker);
-                       kthread_stop(priv->disp_thread[i].thread);
+                       kthread_destroy_worker(&priv->disp_thread[i].worker);
                        priv->disp_thread[i].thread = NULL;
                }
 
                if (priv->event_thread[i].thread) {
-                       kthread_flush_worker(&priv->event_thread[i].worker);
-                       kthread_stop(priv->event_thread[i].thread);
+                       kthread_destroy_worker(&priv->event_thread[i].worker);
                        priv->event_thread[i].thread = NULL;
                }
        }