Date: Wed, 1 Mar 2017 18:05:40 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r314499 - stable/11/sys/dev/gpio Message-ID: <201703011805.v21I5eaQ043402@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201703011805.v21I5eaQ043402>