diff options
author | loos <loos@FreeBSD.org> | 2015-02-14 21:16:19 +0000 |
---|---|---|
committer | loos <loos@FreeBSD.org> | 2015-02-14 21:16:19 +0000 |
commit | a7a8c39e00df26eda21597ddbe0f587ced4375a8 (patch) | |
tree | a2bdaaa92bec82c663e0a841ddfdce165ac2ebf1 /sys/powerpc | |
parent | fd8cd0a9634bc701a7e4e2431a43432b23767400 (diff) | |
download | FreeBSD-src-a7a8c39e00df26eda21597ddbe0f587ced4375a8.zip FreeBSD-src-a7a8c39e00df26eda21597ddbe0f587ced4375a8.tar.gz |
MFC r274670, r274671, r276168:
Moves all the duplicate code to a single function.
Verify for invalid modes and unwanted flags before pass the new flags to
driver.
Make gpio_default_map_gpios() static. No functional changes.
Improves the GPIO API description a little bit.
gpio_pin_max must return the maximum supported pin number and not the total
number of pins on the system.
Diffstat (limited to 'sys/powerpc')
-rw-r--r-- | sys/powerpc/wii/wii_gpio.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/sys/powerpc/wii/wii_gpio.c b/sys/powerpc/wii/wii_gpio.c index b9ecccb..e6d76b8 100644 --- a/sys/powerpc/wii/wii_gpio.c +++ b/sys/powerpc/wii/wii_gpio.c @@ -295,11 +295,6 @@ wiigpio_pin_setflags(device_t dev, uint32_t pin, uint32_t flags) if (pin >= WIIGPIO_NPINS) return (EINVAL); - if ((flags & ~(GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) != 0) - return (EINVAL); - if ((flags & (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) == - (GPIO_PIN_OUTPUT|GPIO_PIN_INPUT)) - return (EINVAL); sc = device_get_softc(dev); pinbank = WIIGPIO_PINBANK(pin); pinmask = WIIGPIO_PINMASK(pin); |