From 3087852d6845aeebf13dd44d4e7c603a24b5be0c Mon Sep 17 00:00:00 2001 From: Lekensteyn Date: Tue, 1 Nov 2011 21:50:05 +0100 Subject: [PATCH] bbswitch: Set dis_enabled flag when toggling --- bbswitch.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bbswitch.c b/bbswitch.c index 5ce7c70..08accca 100644 --- a/bbswitch.c +++ b/bbswitch.c @@ -100,6 +100,8 @@ static void bbswitch_off(void) { pci_set_power_state(dis_dev, PCI_D3hot); bbswitch_acpi_off(); + + dis_enabled = 0; } static void bbswitch_on(void) { @@ -116,6 +118,8 @@ static void bbswitch_on(void) { printk(KERN_WARNING "bbswitch: failed to enable %s\n", dev_name(&dis_dev->dev)); pci_set_master(dis_dev); + + dis_enabled = 1; } static int bbswitch_write(struct file *filp, const char __user *buff,