Date: Wed, 16 Mar 2011 00:42:15 +0000 (UTC) From: Marcel Moolenaar <marcel@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r219684 - head/sys/arm/mv Message-ID: <201103160042.p2G0gFFH064345@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: marcel Date: Wed Mar 16 00:42:15 2011 New Revision: 219684 URL: http://svn.freebsd.org/changeset/base/219684 Log: Fix mv_gpio_in() for pin numbers that occupy bits 8-31 in GPIO registers. The compiler will truncate the 32-bit return value of mv_gpio_value_get() to match the 8-bit return value of mv_gpio_in(). A conditional expression is used to have mv_gpio_in() always return 0 or 1 instead. Modified: head/sys/arm/mv/gpio.c Modified: head/sys/arm/mv/gpio.c ============================================================================== --- head/sys/arm/mv/gpio.c Wed Mar 16 00:08:10 2011 (r219683) +++ head/sys/arm/mv/gpio.c Wed Mar 16 00:42:15 2011 (r219684) @@ -344,7 +344,7 @@ uint8_t mv_gpio_in(uint32_t pin) { - return (mv_gpio_value_get(pin)); + return (mv_gpio_value_get(pin) ? 1 : 0); } static uint32_t
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103160042.p2G0gFFH064345>