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 d2cdc7b..5f85965 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;
                }
        }