diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-08-14 04:39:13 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 1999-08-14 04:39:13 +0000 |
commit | a1f25d4751173b283b52e2d3ded79357cdf2c164 (patch) | |
tree | f38108dbdb481adb2e4b493eb8a42b4692eefbd2 /sys/arch/hppa/gsc | |
parent | 57e913724565c7748bfae4ac709c1e3363bc2c59 (diff) |
update
Diffstat (limited to 'sys/arch/hppa/gsc')
-rw-r--r-- | sys/arch/hppa/gsc/lpt_gsc.c | 25 |
1 files changed, 7 insertions, 18 deletions
diff --git a/sys/arch/hppa/gsc/lpt_gsc.c b/sys/arch/hppa/gsc/lpt_gsc.c index a6f631f6ef4..64777ea66d6 100644 --- a/sys/arch/hppa/gsc/lpt_gsc.c +++ b/sys/arch/hppa/gsc/lpt_gsc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: lpt_gsc.c,v 1.3 1999/04/20 21:17:07 mickey Exp $ */ +/* $OpenBSD: lpt_gsc.c,v 1.4 1999/08/14 04:39:12 mickey Exp $ */ /* * Copyright (c) 1998 Michael Shalayeff @@ -116,17 +116,14 @@ lpt_gsc_probe(parent, match, aux) do { \ printf("lpt_gsc_probe: mask %x data %x failed\n", mask, \ data); \ - goto out; \ + return 0; \ } while (0) #else -#define ABORT goto out +#define ABORT return 0 #endif - base = ca->ca_hpa; - if (bus_space_map(ca->ca_iot, base, IOMOD_HPASIZE, 0, &ioh)) - return 0; - ioh += LPTGSC_OFFSET; - base += LPTGSC_OFFSET; + base = ca->ca_hpa + LPTGSC_OFFSET; + ioh = ca->ca_hpa + LPTGSC_OFFSET; rv = 0; mask = 0xff; @@ -154,12 +151,7 @@ lpt_gsc_probe(parent, match, aux) bus_space_write_1(ca->ca_iot, ioh, lpt_data, 0); bus_space_write_1(ca->ca_iot, ioh, lpt_control, 0); - rv = 1; - -out: - ioh -= LPTGSC_OFFSET; - bus_space_unmap(ca->ca_iot, ioh, IOMOD_HPASIZE); - return rv; + return 1; } void @@ -175,10 +167,7 @@ lpt_gsc_attach(parent, self, aux) sc->sc_state = 0; sc->sc_iot = ga->ga_iot; - if (bus_space_map(sc->sc_iot, ga->ga_hpa, IOMOD_HPASIZE, - 0, &sc->sc_ioh)) - panic("lpt_gsc_attach: couldn't map I/O ports"); - sc->sc_ioh += LPTGSC_OFFSET; + sc->sc_ioh = ga->ga_hpa + LPTGSC_OFFSET; printf("\n"); |