Thread (2 messages) 2 messages, 2 authors, 2014-05-07

Re: [PATCH] rfkill-gpio: Use gpio cansleep version

From: Johannes Berg <johannes@sipsolutions.net>
Date: 2014-05-07 09:02:20
Also in: linux-gpio

On Tue, 2014-05-06 at 18:14 +0200, Loic Poulain wrote:
+	if (gpiod_cansleep(rfkill->shutdown_gpio))
+		gpiod_set_value_cansleep(rfkill->shutdown_gpio, !blocked);
+	else
+		gpiod_set_value(rfkill->shutdown_gpio, !blocked);
+
+	if (gpiod_cansleep(rfkill->reset_gpio))
+		gpiod_set_value_cansleep(rfkill->reset_gpio, !blocked);
+	else
+		gpiod_set_value(rfkill->reset_gpio, !blocked);
Really? I mean, there's not even a fallback where the cansleep() API
calls the non-sleeping one if the cansleep isn't support? This is really
ugly.

johannes
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help