Browse Source

net: rfkill: gpio: Fix clock status

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>
Loic Poulain 11 years ago
parent
commit
fa5c107cc8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      net/rfkill/rfkill-gpio.c

+ 1 - 1
net/rfkill/rfkill-gpio.c

@@ -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;
 }