Commit 7ee33baa authored by Hans de Goede's avatar Hans de Goede Committed by Rafael J. Wysocki

ACPI / video: Move dmi_check_system from module_init to acpi_video_register

When builtin there is no guarantee in which order module_init functions
are run, so acpi_video_register() may get called from the i915 driver
(if it is also builtin) before acpi_video_init() gets called, resulting
in the dmi quirks not yet being parsed.

This commit moves the dmi_check_system() call to acpi_video_register(),
so that we can be sure the dmi quirks have always been applied before
probing.
Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Acked-by: default avatarDarren Hart <dvhart@linux.intel.com>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent 93a291df
...@@ -383,13 +383,13 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level) ...@@ -383,13 +383,13 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
*/ */
static int bqc_offset_aml_bug_workaround; static int bqc_offset_aml_bug_workaround;
static int __init video_set_bqc_offset(const struct dmi_system_id *d) static int video_set_bqc_offset(const struct dmi_system_id *d)
{ {
bqc_offset_aml_bug_workaround = 9; bqc_offset_aml_bug_workaround = 9;
return 0; return 0;
} }
static int __init video_disable_backlight_sysfs_if( static int video_disable_backlight_sysfs_if(
const struct dmi_system_id *d) const struct dmi_system_id *d)
{ {
if (disable_backlight_sysfs_if == -1) if (disable_backlight_sysfs_if == -1)
...@@ -397,7 +397,7 @@ static int __init video_disable_backlight_sysfs_if( ...@@ -397,7 +397,7 @@ static int __init video_disable_backlight_sysfs_if(
return 0; return 0;
} }
static struct dmi_system_id video_dmi_table[] __initdata = { static struct dmi_system_id video_dmi_table[] = {
/* /*
* Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
*/ */
...@@ -1977,6 +1977,8 @@ int acpi_video_register(void) ...@@ -1977,6 +1977,8 @@ int acpi_video_register(void)
mutex_init(&video_list_lock); mutex_init(&video_list_lock);
INIT_LIST_HEAD(&video_bus_head); INIT_LIST_HEAD(&video_bus_head);
dmi_check_system(video_dmi_table);
ret = acpi_bus_register_driver(&acpi_video_bus); ret = acpi_bus_register_driver(&acpi_video_bus);
if (ret) if (ret)
return ret; return ret;
...@@ -2042,8 +2044,6 @@ static int __init acpi_video_init(void) ...@@ -2042,8 +2044,6 @@ static int __init acpi_video_init(void)
if (acpi_disabled) if (acpi_disabled)
return 0; return 0;
dmi_check_system(video_dmi_table);
if (intel_opregion_present()) if (intel_opregion_present())
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment