Date: Fri, 29 Mar 2013 19:04:19 +0000 (UTC) From: Ian Lepore <ian@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248910 - head/sys/arm/at91 Message-ID: <201303291904.r2TJ4Jrb000550@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ian Date: Fri Mar 29 19:04:18 2013 New Revision: 248910 URL: http://svnweb.freebsd.org/changeset/base/248910 Log: Change the API for at91_pio_gpio_get() to return the entire masked set of bits, not just a 0/1 indicating whether any of the masked bits are on. This is compatible with the single in-tree caller of this function right now (at91_vbus_poll() in dev/usb/controller/at91dci_atemelarm.c). Modified: head/sys/arm/at91/at91_pio.c Modified: head/sys/arm/at91/at91_pio.c ============================================================================== --- head/sys/arm/at91/at91_pio.c Fri Mar 29 18:47:08 2013 (r248909) +++ head/sys/arm/at91/at91_pio.c Fri Mar 29 19:04:18 2013 (r248910) @@ -361,9 +361,7 @@ at91_pio_gpio_get(uint32_t pio, uint32_t { uint32_t *PIO = (uint32_t *)(AT91_BASE + pio); - data_mask &= PIO[PIO_PDSR / 4]; - - return (data_mask ? 1 : 0); + return ((PIO[PIO_PDSR / 4] & data_mask)); } void
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303291904.r2TJ4Jrb000550>