diff options
author | jhb <jhb@FreeBSD.org> | 2008-06-06 18:29:56 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2008-06-06 18:29:56 +0000 |
commit | 8d2a500ba59f81e6597a356c696219e4b5cffa44 (patch) | |
tree | 6f9d08409ea9bce0041bfb7f00f5f9aca04893e7 /sys/pci/amdsmb.c | |
parent | b78502eaeea24f85d4c6e7f828b238179d636a21 (diff) | |
download | FreeBSD-src-8d2a500ba59f81e6597a356c696219e4b5cffa44.zip FreeBSD-src-8d2a500ba59f81e6597a356c696219e4b5cffa44.tar.gz |
- Use bus_foo() rather than bus_space_foo() and remove bus space tag/handle
from softc.
- Mark interrupt handlers MPSAFE as these drivers have been locked for a
while.
Diffstat (limited to 'sys/pci/amdsmb.c')
-rw-r--r-- | sys/pci/amdsmb.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/pci/amdsmb.c b/sys/pci/amdsmb.c index ecf4fcc..264b11a 100644 --- a/sys/pci/amdsmb.c +++ b/sys/pci/amdsmb.c @@ -110,8 +110,6 @@ static int amdsmb_debug = 0; struct amdsmb_softc { int rid; struct resource *res; - bus_space_tag_t smbst; - bus_space_handle_t smbsh; device_t smbus; struct mtx lock; }; @@ -121,9 +119,9 @@ struct amdsmb_softc { #define AMDSMB_LOCK_ASSERT(amdsmb) mtx_assert(&(amdsmb)->lock, MA_OWNED) #define AMDSMB_ECINB(amdsmb, register) \ - (bus_space_read_1(amdsmb->smbst, amdsmb->smbsh, register)) + (bus_read_1(amdsmb->res, register)) #define AMDSMB_ECOUTB(amdsmb, register, value) \ - (bus_space_write_1(amdsmb->smbst, amdsmb->smbsh, register, value)) + (bus_write_1(amdsmb->res, register, value)) static int amdsmb_detach(device_t dev); @@ -163,8 +161,6 @@ amdsmb_attach(device_t dev) return (ENXIO); } - amdsmb_sc->smbst = rman_get_bustag(amdsmb_sc->res); - amdsmb_sc->smbsh = rman_get_bushandle(amdsmb_sc->res); mtx_init(&amdsmb_sc->lock, device_get_nameunit(dev), "amdsmb", MTX_DEF); /* Allocate a new smbus device */ |