Thread (28 messages) 28 messages, 10 authors, 2014-01-29
STALE4533d
Revisions (2)
  1. rfc current
  2. v1 [diff vs current]

[PATCH RFC 3/6] net: rfkill: gpio: fix reversed clock enable state

From: Chen-Yu Tsai <hidden>
Date: 2014-01-17 06:47:46
Also in: linux-devicetree, linux-wireless, lkml, netdev
Subsystem: rfkill, the rest · Maintainers: Johannes Berg, Linus Torvalds

rfkill-gpio has clk_enabled = blocked, which is true when rfkill
blocks the device. This results in calling clock enable/disable at
the wrong time. Reversing the value fixes this.

Signed-off-by: Chen-Yu Tsai <redacted>
---
 net/rfkill/rfkill-gpio.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/rfkill/rfkill-gpio.c b/net/rfkill/rfkill-gpio.c
index c7081b7..3084fa3 100644
--- a/net/rfkill/rfkill-gpio.c
+++ b/net/rfkill/rfkill-gpio.c
@@ -59,7 +59,7 @@ static int rfkill_gpio_set_power(void *data, bool blocked)
 		gpiod_set_value(rfkill->shutdown_gpio, 1);
 	}
 
-	rfkill->clk_enabled = blocked;
+	rfkill->clk_enabled = !blocked;
 
 	return 0;
 }
-- 
1.8.5.2
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help