diff options
author | 2006-04-01 08:32:52 +0000 | |
---|---|---|
committer | 2006-04-01 08:32:52 +0000 | |
commit | 9472b0652e5e278c17d3c587f831d74fcb6b4970 (patch) | |
tree | a91a2f73d28a76cffa6f45e70ff5d7500d8f505f | |
parent | Add rcs -l, rcs -u, and regression tests. (diff) | |
download | wireguard-openbsd-9472b0652e5e278c17d3c587f831d74fcb6b4970.tar.xz wireguard-openbsd-9472b0652e5e278c17d3c587f831d74fcb6b4970.zip |
Small fixes from form@:
- don't allow wildcard port locator
- use GPIO_PIN_LOW instead of 0
-rw-r--r-- | sys/dev/isa/isagpio.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/dev/isa/isagpio.c b/sys/dev/isa/isagpio.c index 8c7687e995e..6be56c28f6e 100644 --- a/sys/dev/isa/isagpio.c +++ b/sys/dev/isa/isagpio.c @@ -1,4 +1,4 @@ -/* $OpenBSD: isagpio.c,v 1.2 2006/03/27 07:16:04 grange Exp $ */ +/* $OpenBSD: isagpio.c,v 1.3 2006/04/01 08:32:52 grange Exp $ */ /* * Copyright (c) 2006 Oleg Safiullin <form@pdp-11.org.ru> @@ -74,7 +74,8 @@ isagpio_match(struct device *parent, void *match, void *aux) struct isa_attach_args *ia = aux; bus_space_handle_t ioh; - if (bus_space_map(ia->ia_iot, ia->ia_iobase, ISAGPIO_IOSIZE, 0, &ioh)) + if (ia->ia_iobase == -1 || bus_space_map(ia->ia_iot, ia->ia_iobase, + ISAGPIO_IOSIZE, 0, &ioh) != 0) return (0); bus_space_unmap(ia->ia_iot, ioh, ISAGPIO_IOSIZE); @@ -109,7 +110,7 @@ isagpio_attach(struct device *parent, struct device *self, void *aux) for (i = 0; i < ISAGPIO_NPINS; i++) { sc->sc_gpio_pins[i].pin_num = i; sc->sc_gpio_pins[i].pin_caps = GPIO_PIN_INPUT | GPIO_PIN_OUTPUT; - sc->sc_gpio_pins[i].pin_state = 0; + sc->sc_gpio_pins[i].pin_state = GPIO_PIN_LOW; } sc->sc_gpio_gc.gp_cookie = sc; |