diff options
author | Corentin Chary <corentin.chary@gmail.com> | 2012-06-13 09:32:02 +0200 |
---|---|---|
committer | Matthew Garrett <mjg@redhat.com> | 2012-07-28 06:11:48 +0200 |
commit | a60b21763cce01c64cc537869662b41429c62e5f (patch) | |
tree | ce4f466fd454dcb0cbf0759c9d530c698cf31b71 /drivers/platform/x86/acer-wmi.c | |
parent | acpi: add a way to promote/demote vendor backlight drivers (diff) | |
download | linux-a60b21763cce01c64cc537869662b41429c62e5f.tar.xz linux-a60b21763cce01c64cc537869662b41429c62e5f.zip |
drivers-platform-x86: use acpi_video_dmi_promote_vendor()
Instead of using directly acpi_video_unregister(), use
acpi_video_dmi_promote_vendor() (and make it call
acpi_video_unregister() if needed)
Signed-off-by: Corentin Chary <corentin.chary@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Diffstat (limited to 'drivers/platform/x86/acer-wmi.c')
-rw-r--r-- | drivers/platform/x86/acer-wmi.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c index 175809dd5587..377d92d8d9b1 100644 --- a/drivers/platform/x86/acer-wmi.c +++ b/drivers/platform/x86/acer-wmi.c @@ -2191,14 +2191,16 @@ static int __init acer_wmi_init(void) set_quirks(); + if (dmi_check_system(video_vendor_dmi_table)) + acpi_video_dmi_promote_vendor(); if (acpi_video_backlight_support()) { - if (dmi_check_system(video_vendor_dmi_table)) { - acpi_video_unregister(); - } else { - interface->capability &= ~ACER_CAP_BRIGHTNESS; - pr_info("Brightness must be controlled by " - "acpi video driver\n"); - } + interface->capability &= ~ACER_CAP_BRIGHTNESS; + pr_info("Brightness must be controlled by acpi video driver\n"); + } else { +#ifdef CONFIG_ACPI_VIDEO + pr_info("Disabling ACPI video driver\n"); + acpi_video_unregister(); +#endif } if (wmi_has_guid(WMID_GUID3)) { |