summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-03-06 01:29:16 +0100
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-03-06 01:29:16 +0100
commit1e3e770cfb2b0f63a15bf8bcd31ad8eed2e76f0d (patch)
treec0f3195d186a9e9f4dcd1d4eb7fab0cdd1639ace /drivers
parent79d223646baa14272dc90044a0e798c552b72eda (diff)
parent28d634038d8fed8d25b92f21b728318a79c0be00 (diff)
Merge branch 'acpi-video'
* acpi-video: ACPI / video: Propagate the error code for acpi_video_register ACPI / video: Load the module even if ACPI is disabled
Diffstat (limited to 'drivers')
-rw-r--r--drivers/acpi/video.c20
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)
int acpi_video_register(void)
{
- int result = 0;
+ int ret;
+
if (register_count) {
/*
* if the function of acpi_video_register is already called,
@@ -2122,9 +2123,9 @@ int acpi_video_register(void)
mutex_init(&video_list_lock);
INIT_LIST_HEAD(&video_bus_head);
- result = acpi_bus_register_driver(&acpi_video_bus);
- if (result < 0)
- return -ENODEV;
+ ret = acpi_bus_register_driver(&acpi_video_bus);
+ if (ret)
+ return ret;
/*
* When the acpi_video_bus is loaded successfully, increase
@@ -2176,6 +2177,17 @@ EXPORT_SYMBOL(acpi_video_unregister_backlight);
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())