summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorAlexander Yurchenko <grange@cvs.openbsd.org>2006-03-27 07:16:05 +0000
committerAlexander Yurchenko <grange@cvs.openbsd.org>2006-03-27 07:16:05 +0000
commit7e921f96f773874f8e47de98ef366f1bbf69014d (patch)
treeb059aa5915841e21e27601378f595f2384eb01b2 /sys/dev
parent9ff5e4b4a1399939f86bec6e2ac2e40285e355d6 (diff)
Some minor nits from form@, no functional changes.
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/isa/isagpio.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/sys/dev/isa/isagpio.c b/sys/dev/isa/isagpio.c
index 63b7485a2d4..8c7687e995e 100644
--- a/sys/dev/isa/isagpio.c
+++ b/sys/dev/isa/isagpio.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: isagpio.c,v 1.1 2006/03/26 20:19:53 grange Exp $ */
+/* $OpenBSD: isagpio.c,v 1.2 2006/03/27 07:16:04 grange Exp $ */
/*
* Copyright (c) 2006 Oleg Safiullin <form@pdp-11.org.ru>
@@ -93,7 +93,6 @@ isagpio_attach(struct device *parent, struct device *self, void *aux)
struct isagpio_softc *sc = (void *)self;
struct isa_attach_args *ia = aux;
struct gpiobus_attach_args gba;
- u_int16_t mask;
int i;
if (bus_space_map(ia->ia_iot, ia->ia_iobase, ia->ia_iosize, 0,
@@ -107,7 +106,7 @@ isagpio_attach(struct device *parent, struct device *self, void *aux)
sc->sc_iot = ia->ia_iot;
sc->sc_gpio_mask = 0;
- for (i = 0, mask = 0x01; i < ISAGPIO_NPINS; mask <<= 1, i++) {
+ 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;
@@ -133,7 +132,7 @@ isagpio_pin_read(void *arg, int pin)
u_int8_t mask;
mask = bus_space_read_1(sc->sc_iot, sc->sc_ioh, 0);
- return ((mask >> pin) & 0x0001);
+ return ((mask >> pin) & 0x01);
}
void