From: Hong Liu Date: Fri, 9 May 2008 02:08:36 +0000 (+0800) Subject: fixup i915 workqueue handling when modeset=1 X-Git-Tag: libdrm-2.4.3~16^2~193 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dce34421947d1828ff76c001281107e937e307d4;p=platform%2Fupstream%2Flibdrm.git fixup i915 workqueue handling when modeset=1 Fixup workqueue creation error handling and make sure we destroy the queue on unload. --- diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c index 8824b95..b9e7e17 100644 --- a/shared-core/i915_init.c +++ b/shared-core/i915_init.c @@ -256,7 +256,7 @@ int i915_driver_load(struct drm_device *dev, unsigned long flags) DRM_DEBUG("Enabled hardware status page\n"); dev_priv->wq = create_singlethread_workqueue("i915"); - if (dev_priv == 0) { + if (dev_priv->wq == 0) { DRM_DEBUG("Error\n"); } @@ -291,6 +291,7 @@ int i915_driver_unload(struct drm_device *dev) if (drm_core_check_feature(dev, DRIVER_MODESET)) { drm_irq_uninstall(dev); intel_modeset_cleanup(dev); + destroy_workqueue(dev_priv->wq); } #if 0