svn commit: r248910 - head/sys/arm/at91
Ian Lepore
ian at FreeBSD.org
Fri Mar 29 19:04:19 UTC 2013
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
More information about the svn-src-head
mailing list