aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/platform/x86/apple-gmux.c
diff options
context:
space:
mode:
authorCorentin Chary <corentin.chary@gmail.com>2012-06-13 09:32:02 +0200
committerMatthew Garrett <mjg@redhat.com>2012-07-28 00:11:48 -0400
commita60b21763cce01c64cc537869662b41429c62e5f (patch)
treece4f466fd454dcb0cbf0759c9d530c698cf31b71 /drivers/platform/x86/apple-gmux.c
parentacpi: add a way to promote/demote vendor backlight drivers (diff)
downloadlinux-dev-a60b21763cce01c64cc537869662b41429c62e5f.tar.xz
linux-dev-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/apple-gmux.c')
-rw-r--r--drivers/platform/x86/apple-gmux.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/platform/x86/apple-gmux.c b/drivers/platform/x86/apple-gmux.c
index 694a15a56230..905fa01ac8df 100644
--- a/drivers/platform/x86/apple-gmux.c
+++ b/drivers/platform/x86/apple-gmux.c
@@ -193,7 +193,10 @@ static int __devinit gmux_probe(struct pnp_dev *pnp,
* backlight control and supports more levels than other options.
* Disable the other backlight choices.
*/
+ acpi_video_dmi_promote_vendor();
+#ifdef CONFIG_ACPI_VIDEO
acpi_video_unregister();
+#endif
apple_bl_unregister();
return 0;
@@ -213,7 +216,10 @@ static void __devexit gmux_remove(struct pnp_dev *pnp)
release_region(gmux_data->iostart, gmux_data->iolen);
kfree(gmux_data);
+ acpi_video_dmi_demote_vendor();
+#ifdef CONFIG_ACPI_VIDEO
acpi_video_register();
+#endif
apple_bl_register();
}