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 _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"