svn commit: r311658 - head/sys/dev/gpio
Ian Lepore
ian at FreeBSD.org
Sat Jan 7 22:55:24 UTC 2017
Author: ian
Date: Sat Jan 7 22:55:23 2017
New Revision: 311658
URL: https://svnweb.freebsd.org/changeset/base/311658
Log:
Only write to *active once, even when GPIO_ACTIVE_LOW is set.
Modified:
head/sys/dev/gpio/ofw_gpiobus.c
Modified: head/sys/dev/gpio/ofw_gpiobus.c
==============================================================================
--- head/sys/dev/gpio/ofw_gpiobus.c Sat Jan 7 20:26:19 2017 (r311657)
+++ head/sys/dev/gpio/ofw_gpiobus.c Sat Jan 7 22:55:23 2017 (r311658)
@@ -178,9 +178,10 @@ gpio_pin_is_active(gpio_pin_t pin, bool
return (rv);
}
- *active = tmp != 0;
if (pin->flags & GPIO_ACTIVE_LOW)
- *active = !(*active);
+ *active = tmp == 0;
+ else
+ *active = tmp != 0;
return (0);
}
More information about the svn-src-all
mailing list