Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b33ecdd1 authored by Daniel Vetter's avatar Daniel Vetter
Browse files

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: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Tested-by: default avatarPaulo Zanoni <paulo.r.zanoni@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 6605782f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);
}