From 3b4f22483077a5ba8f7e82fc7a539beb58ad1f43 Mon Sep 17 00:00:00 2001 From: Lekensteyn Date: Tue, 1 Nov 2011 21:52:48 +0100 Subject: [PATCH] Fix dis_enabled flags values --- bbswitch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bbswitch.c b/bbswitch.c index 08accca..75ab61d 100644 --- a/bbswitch.c +++ b/bbswitch.c @@ -22,7 +22,7 @@ static const char acpi_optimus_dsm_muid[] = { static struct pci_dev *dis_dev; static acpi_handle dis_handle; -static int dis_enabled = 0; +static int dis_enabled = 1; /* shamelessly taken from nouveau_acpi.c */ static int acpi_optimus_dsm(acpi_handle handle, int func, char *args, @@ -89,7 +89,7 @@ static void bbswitch_acpi_on(void) { } static void bbswitch_off(void) { - if (dis_enabled) + if (!dis_enabled) return; printk(KERN_INFO "bbswitch: disabling discrete graphics\n"); @@ -105,7 +105,7 @@ static void bbswitch_off(void) { } static void bbswitch_on(void) { - if (!dis_enabled) + if (dis_enabled) return; printk(KERN_INFO "bbswitch: enabling discrete graphics\n");