From: brad Date: Wed, 30 Jul 2008 16:47:09 +0000 (+0000) Subject: Check and clear the bus space mapping size instead of the bus space X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=dd1a6058ff043d4e19999d6cd74274b14e0305c7;p=openbsd Check and clear the bus space mapping size instead of the bus space handle in the detach function. Fixes compilation on sparc64. ok reyk@ --- diff --git a/sys/dev/pci/if_ath_pci.c b/sys/dev/pci/if_ath_pci.c index b0097b3e4e6..d296afcc94a 100644 --- a/sys/dev/pci/if_ath_pci.c +++ b/sys/dev/pci/if_ath_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ath_pci.c,v 1.17 2008/07/29 00:18:25 reyk Exp $ */ +/* $OpenBSD: if_ath_pci.c,v 1.18 2008/07/30 16:47:09 brad Exp $ */ /* $NetBSD: if_ath_pci.c,v 1.7 2004/06/30 05:58:17 mycroft Exp $ */ /*- @@ -213,9 +213,9 @@ ath_pci_detach(struct device *self, int flags) psc->sc_sdhook = NULL; } - if (sc->sc_sh != 0) { + if (sc->sc_ss != 0) { bus_space_unmap(sc->sc_st, sc->sc_sh, sc->sc_ss); - sc->sc_sh = 0; + sc->sc_ss = 0; } return (0);