summaryrefslogtreecommitdiff
path: root/drivers/platform/x86/acer-wmi.c
diff options
context:
space:
mode:
authorCorentin Chary <corentin.chary@gmail.com>2012-06-13 07:32:02 (GMT)
committerMatthew Garrett <mjg@redhat.com>2012-07-28 04:11:48 (GMT)
commita60b21763cce01c64cc537869662b41429c62e5f (patch)
treece4f466fd454dcb0cbf0759c9d530c698cf31b71 /drivers/platform/x86/acer-wmi.c
parentf838eb5bd257e8a666aa8c451058fa198df7e299 (diff)
downloadlinux-a60b21763cce01c64cc537869662b41429c62e5f.tar.xz
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.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/platform/x86/acer-wmi.c b/drivers/platform/x86/acer-wmi.c
index 175809d..377d92d 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)) {