aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans de Goede <hdegoede@redhat.com>2015-06-16 10:27:53 -0400
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-06-18 19:11:09 -0400
commit7ee33baabcae765e1eda73b988a62fe102c0ce76 (patch)
tree25f56833af6a9ce6033f810ae648d4e81a2f6f82
parent93a291dfaf9c328ca5a9cea1733af1a128efe890 (diff)
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: Hans de Goede <hdegoede@redhat.com> Acked-by: Darren Hart <dvhart@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
-rw-r--r--drivers/acpi/acpi_video.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/acpi/acpi_video.c b/drivers/acpi/acpi_video.c
index 23490f045895..efa0ab553aa3 100644
--- a/drivers/acpi/acpi_video.c
+++ b/drivers/acpi/acpi_video.c
@@ -383,13 +383,13 @@ acpi_video_device_lcd_set_level(struct acpi_video_device *device, int level)
383 */ 383 */
384 384
385static int bqc_offset_aml_bug_workaround; 385static int bqc_offset_aml_bug_workaround;
386static int __init video_set_bqc_offset(const struct dmi_system_id *d) 386static int video_set_bqc_offset(const struct dmi_system_id *d)
387{ 387{
388 bqc_offset_aml_bug_workaround = 9; 388 bqc_offset_aml_bug_workaround = 9;
389 return 0; 389 return 0;
390} 390}
391 391
392static int __init video_disable_backlight_sysfs_if( 392static int video_disable_backlight_sysfs_if(
393 const struct dmi_system_id *d) 393 const struct dmi_system_id *d)
394{ 394{
395 if (disable_backlight_sysfs_if == -1) 395 if (disable_backlight_sysfs_if == -1)
@@ -397,7 +397,7 @@ static int __init video_disable_backlight_sysfs_if(
397 return 0; 397 return 0;
398} 398}
399 399
400static struct dmi_system_id video_dmi_table[] __initdata = { 400static struct dmi_system_id video_dmi_table[] = {
401 /* 401 /*
402 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121 402 * Broken _BQC workaround http://bugzilla.kernel.org/show_bug.cgi?id=13121
403 */ 403 */
@@ -1977,6 +1977,8 @@ int acpi_video_register(void)
1977 mutex_init(&video_list_lock); 1977 mutex_init(&video_list_lock);
1978 INIT_LIST_HEAD(&video_bus_head); 1978 INIT_LIST_HEAD(&video_bus_head);
1979 1979
1980 dmi_check_system(video_dmi_table);
1981
1980 ret = acpi_bus_register_driver(&acpi_video_bus); 1982 ret = acpi_bus_register_driver(&acpi_video_bus);
1981 if (ret) 1983 if (ret)
1982 return ret; 1984 return ret;
@@ -2042,8 +2044,6 @@ static int __init acpi_video_init(void)
2042 if (acpi_disabled) 2044 if (acpi_disabled)
2043 return 0; 2045 return 0;
2044 2046
2045 dmi_check_system(video_dmi_table);
2046
2047 if (intel_opregion_present()) 2047 if (intel_opregion_present())
2048 return 0; 2048 return 0;
2049 2049