summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2013-03-29 19:04:18 +0000
committerian <ian@FreeBSD.org>2013-03-29 19:04:18 +0000
commit581bf19e7bb488ada78ea6e80fb79bda826b9c17 (patch)
tree3540c820e6e9cfb5489efb4de26ff27a9ff7517c
parent899ea162b1d07082910e0f33ea4ee88c844b14c1 (diff)
downloadFreeBSD-src-581bf19e7bb488ada78ea6e80fb79bda826b9c17.zip
FreeBSD-src-581bf19e7bb488ada78ea6e80fb79bda826b9c17.tar.gz
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).
-rw-r--r--sys/arm/at91/at91_pio.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/sys/arm/at91/at91_pio.c b/sys/arm/at91/at91_pio.c
index ae5f91e..14620f6 100644
--- a/sys/arm/at91/at91_pio.c
+++ b/sys/arm/at91/at91_pio.c
@@ -361,9 +361,7 @@ at91_pio_gpio_get(uint32_t pio, uint32_t data_mask)
{
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
OpenPOWER on IntegriCloud