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>
This commit is contained in:
parent
6605782f79
commit
b33ecdd1cd
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue