svn commit: r314499 - stable/11/sys/dev/gpio
Ian Lepore
ian at FreeBSD.org
Wed Mar 1 18:05:42 UTC 2017
Author: ian
Date: Wed Mar 1 18:05:40 2017
New Revision: 314499
URL: https://svnweb.freebsd.org/changeset/base/314499
Log:
MFC r311658:
Only write to *active once, even when GPIO_ACTIVE_LOW is set.
Modified:
stable/11/sys/dev/gpio/ofw_gpiobus.c
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/dev/gpio/ofw_gpiobus.c
==============================================================================
--- stable/11/sys/dev/gpio/ofw_gpiobus.c Wed Mar 1 18:03:34 2017 (r314498)
+++ stable/11/sys/dev/gpio/ofw_gpiobus.c Wed Mar 1 18:05:40 2017 (r314499)
@@ -176,9 +176,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-stable
mailing list