summaryrefslogtreecommitdiffstats
path: root/sys/arm/samsung
diff options
context:
space:
mode:
authorloos <loos@FreeBSD.org>2014-11-18 17:22:08 +0000
committerloos <loos@FreeBSD.org>2014-11-18 17:22:08 +0000
commit9ad347c496791d44755a039c789c80c0d24da3cb (patch)
treeeda20a10765b9706a2970cc5bb5554d7f74e4af9 /sys/arm/samsung
parente1857bb370d9a97ed8bd6dc4ca7cdc6e4836fe0b (diff)
downloadFreeBSD-src-9ad347c496791d44755a039c789c80c0d24da3cb.zip
FreeBSD-src-9ad347c496791d44755a039c789c80c0d24da3cb.tar.gz
Moves all the duplicate code to a single function.
Verify for invalid modes and unwanted flags before pass the new flags to driver.
Diffstat (limited to 'sys/arm/samsung')
-rw-r--r--sys/arm/samsung/exynos/exynos5_pad.c9
1 files changed, 0 insertions, 9 deletions
diff --git a/sys/arm/samsung/exynos/exynos5_pad.c b/sys/arm/samsung/exynos/exynos5_pad.c
index d00eddc..c28ebb1 100644
--- a/sys/arm/samsung/exynos/exynos5_pad.c
+++ b/sys/arm/samsung/exynos/exynos5_pad.c
@@ -764,15 +764,6 @@ pad_pin_setflags(device_t dev, uint32_t pin, uint32_t flags)
if (i >= sc->gpio_npins)
return (EINVAL);
- /* Check for unwanted flags. */
- if ((flags & sc->gpio_pins[i].gp_caps) != flags)
- return (EINVAL);
-
- /* Can't mix input/output together */
- if ((flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) ==
- (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT))
- return (EINVAL);
-
pad_pin_configure(sc, &sc->gpio_pins[i], flags);
return (0);
OpenPOWER on IntegriCloud