diff options
| -rw-r--r-- | drivers/acpi/video.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c index debd30917010..26eb70c8f518 100644 --- a/drivers/acpi/video.c +++ b/drivers/acpi/video.c | |||
| @@ -2110,7 +2110,8 @@ static int __init intel_opregion_present(void) | |||
| 2110 | 2110 | ||
| 2111 | int acpi_video_register(void) | 2111 | int acpi_video_register(void) |
| 2112 | { | 2112 | { |
| 2113 | int result = 0; | 2113 | int ret; |
| 2114 | |||
| 2114 | if (register_count) { | 2115 | if (register_count) { |
| 2115 | /* | 2116 | /* |
| 2116 | * if the function of acpi_video_register is already called, | 2117 | * if the function of acpi_video_register is already called, |
| @@ -2122,9 +2123,9 @@ int acpi_video_register(void) | |||
| 2122 | mutex_init(&video_list_lock); | 2123 | mutex_init(&video_list_lock); |
| 2123 | INIT_LIST_HEAD(&video_bus_head); | 2124 | INIT_LIST_HEAD(&video_bus_head); |
| 2124 | 2125 | ||
| 2125 | result = acpi_bus_register_driver(&acpi_video_bus); | 2126 | ret = acpi_bus_register_driver(&acpi_video_bus); |
| 2126 | if (result < 0) | 2127 | if (ret) |
| 2127 | return -ENODEV; | 2128 | return ret; |
| 2128 | 2129 | ||
| 2129 | /* | 2130 | /* |
| 2130 | * When the acpi_video_bus is loaded successfully, increase | 2131 | * When the acpi_video_bus is loaded successfully, increase |
| @@ -2176,6 +2177,17 @@ EXPORT_SYMBOL(acpi_video_unregister_backlight); | |||
| 2176 | 2177 | ||
| 2177 | static int __init acpi_video_init(void) | 2178 | static int __init acpi_video_init(void) |
| 2178 | { | 2179 | { |
| 2180 | /* | ||
| 2181 | * Let the module load even if ACPI is disabled (e.g. due to | ||
| 2182 | * a broken BIOS) so that i915.ko can still be loaded on such | ||
| 2183 | * old systems without an AcpiOpRegion. | ||
| 2184 | * | ||
| 2185 | * acpi_video_register() will report -ENODEV later as well due | ||
| 2186 | * to acpi_disabled when i915.ko tries to register itself afterwards. | ||
| 2187 | */ | ||
| 2188 | if (acpi_disabled) | ||
| 2189 | return 0; | ||
| 2190 | |||
| 2179 | dmi_check_system(video_dmi_table); | 2191 | dmi_check_system(video_dmi_table); |
| 2180 | 2192 | ||
| 2181 | if (intel_opregion_present()) | 2193 | if (intel_opregion_present()) |
