summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHong Liu <hong.liu@intel.com>2008-05-09 10:08:36 +0800
committerJesse Barnes <jbarnes@virtuousgeek.org>2008-05-09 14:29:10 -0700
commitdce34421947d1828ff76c001281107e937e307d4 (patch)
tree9fbe22a7304a2c855164ba4febd509be884999e9
parent6ee0c09b0e2746022c25962cbfe655f2f1d5c53e (diff)
fixup i915 workqueue handling when modeset=1
Fixup workqueue creation error handling and make sure we destroy the queue on unload.
-rw-r--r--shared-core/i915_init.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shared-core/i915_init.c b/shared-core/i915_init.c
index 8824b959..b9e7e17b 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