From: Chris Wilson Date: Wed, 13 Jul 2016 17:34:44 +0000 (+0100) Subject: drm/i915/fbdev: Drain the suspend worker on retiring X-Git-Tag: v4.9.8~1110^2~42^2~194 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0b8c0e9c3354953a5d6f90ece82961017053dc74;p=platform%2Fkernel%2Flinux-rpi3.git drm/i915/fbdev: Drain the suspend worker on retiring Since the suspend_work can arm itself if the console_lock() is currently held elsewhere, simply calling flush_work() doesn't guarantee that the work is idle upon return. To do so requires using cancel_work_sync(). Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Mika Kuoppala Link: http://patchwork.freedesktop.org/patch/msgid/1468431285-28264-1-git-send-email-chris@chris-wilson.co.uk Reviewed-by: Mika Kuoppala --- diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c index 86b00c6..ef17d88 100644 --- a/drivers/gpu/drm/i915/intel_fbdev.c +++ b/drivers/gpu/drm/i915/intel_fbdev.c @@ -768,7 +768,7 @@ void intel_fbdev_fini(struct drm_device *dev) if (!ifbdev) return; - flush_work(&dev_priv->fbdev_suspend_work); + cancel_work_sync(&dev_priv->fbdev_suspend_work); if (!current_is_async()) intel_fbdev_sync(ifbdev);