net: rfkill: gpio: Fix clock status
authorLoic Poulain <loic.poulain@intel.com>
Tue, 16 Sep 2014 12:53:58 +0000 (14:53 +0200)
committerJohn W. Linville <linville@tuxdriver.com>
Mon, 22 Sep 2014 20:02:15 +0000 (16:02 -0400)
Clock is disabled when the device is blocked.
So, clock_enabled is the logical negation of "blocked".

Signed-off-by: Loic Poulain <loic.poulain@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
net/rfkill/rfkill-gpio.c

index 5fa54dd..0f62326 100644 (file)
@@ -54,7 +54,7 @@ static int rfkill_gpio_set_power(void *data, bool blocked)
        if (blocked && !IS_ERR(rfkill->clk) && rfkill->clk_enabled)
                clk_disable(rfkill->clk);
 
-       rfkill->clk_enabled = blocked;
+       rfkill->clk_enabled = !blocked;
 
        return 0;
 }