apple_gmux: Fix ACPI video unregister
authorMatthew Garrett <mjg@redhat.com>
Fri, 17 Aug 2012 20:57:20 +0000 (16:57 -0400)
committerMatthew Garrett <mjg@redhat.com>
Fri, 17 Aug 2012 21:34:39 +0000 (17:34 -0400)
We were only calling acpi_video_unregister() if ACPI video support was built
in, not if it was a module.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
drivers/platform/x86/apple-gmux.c

index 0d140e1879e7ff652d303ed6a153bb9d62da37d9..85e1bfbd11216fd15f276746cf3a71b3f1dea491 100644 (file)
@@ -348,7 +348,7 @@ static int __devinit gmux_probe(struct pnp_dev *pnp,
         * Disable the other backlight choices.
         */
        acpi_video_dmi_promote_vendor();
-#ifdef CONFIG_ACPI_VIDEO
+#if defined (CONFIG_ACPI_VIDEO) || defined (CONFIG_ACPI_VIDEO_MODULE)
        acpi_video_unregister();
 #endif
        apple_bl_unregister();
@@ -371,7 +371,7 @@ static void __devexit gmux_remove(struct pnp_dev *pnp)
        kfree(gmux_data);
 
        acpi_video_dmi_demote_vendor();
-#ifdef CONFIG_ACPI_VIDEO
+#if defined (CONFIG_ACPI_VIDEO) || defined (CONFIG_ACPI_VIDEO_MODULE)
        acpi_video_register();
 #endif
        apple_bl_register();