summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-15 17:16:33 +0100
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-11-25 09:41:03 +0100
commitb33ecdd1cdeb90ca07dd28d648558e87c8680443 (patch)
treedd66c38eb33ac3171731978c1b48827636d1d0f2 /drivers/gpu/drm/i915
parenti915, fbdev: Fix Kconfig typo (diff)
downloadlinux-b33ecdd1cdeb90ca07dd28d648558e87c8680443.tar.xz
linux-b33ecdd1cdeb90ca07dd28d648558e87c8680443.zip
drm/i915: Fix module unloading with DRM_I915_UMS=n
Oops, makes testing early boot failures in i915.ko a bit more pain, so let's fix it. v2: We already have a bit of static storage to track this (Chris). Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Tested-by: Paulo Zanoni <paulo.r.zanoni@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index 583adcbef5e4..804a139901a2 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -1022,6 +1022,11 @@ static int __init i915_init(void)
static void __exit i915_exit(void)
{
+#ifndef CONFIG_DRM_I915_UMS
+ if (!(driver.driver_features & DRIVER_MODESET))
+ return; /* Never loaded a driver. */
+#endif
+
drm_pci_exit(&driver, &i915_pci_driver);
}