ACPI / video: Load the module even if ACPI is disabled
[firefly-linux-kernel-4.4.55.git] / drivers / acpi / video.c
index 82a01cc45f9cb55272020af4c30c3616e7bd4d11..0dc9ff61d7c2e5b72691855f04d95c593d699a2b 100644 (file)
@@ -1953,6 +1953,17 @@ EXPORT_SYMBOL(acpi_video_unregister);
 
 static int __init acpi_video_init(void)
 {
+       /*
+        * Let the module load even if ACPI is disabled (e.g. due to
+        * a broken BIOS) so that i915.ko can still be loaded on such
+        * old systems without an AcpiOpRegion.
+        *
+        * acpi_video_register() will report -ENODEV later as well due
+        * to acpi_disabled when i915.ko tries to register itself afterwards.
+        */
+       if (acpi_disabled)
+               return 0;
+
        dmi_check_system(video_dmi_table);
 
        if (intel_opregion_present())