diff options
author | tijl <tijl@FreeBSD.org> | 2010-12-18 14:21:28 +0000 |
---|---|---|
committer | tijl <tijl@FreeBSD.org> | 2010-12-18 14:21:28 +0000 |
commit | c76be15f2cdecfdf9514336b8c1e79d7a995d3ac (patch) | |
tree | d606cfb88c0f681d804f6d53b4b1543014544cf1 /sys/dev/sound | |
parent | 2d5f188391b0a2895801eba928d5baac6b2adf4d (diff) | |
download | FreeBSD-src-c76be15f2cdecfdf9514336b8c1e79d7a995d3ac.zip FreeBSD-src-c76be15f2cdecfdf9514336b8c1e79d7a995d3ac.tar.gz |
Use convenience functions where possible instead of accessing the PCI
configuration registers directly.
Remove pci_enable_io calls where they are redundant. The PCI bus driver
will set the right bits when the corresponding bus resource is activated.
Remove redundant pci_* function calls from suspend/resume methods. The
bus driver already saves and restores the PCI configuration.
Reviewed by: jhb
Approved by: kib (mentor)
Diffstat (limited to 'sys/dev/sound')
-rw-r--r-- | sys/dev/sound/pci/atiixp.c | 6 | ||||
-rw-r--r-- | sys/dev/sound/pci/ich.c | 6 |
2 files changed, 0 insertions, 12 deletions
diff --git a/sys/dev/sound/pci/atiixp.c b/sys/dev/sound/pci/atiixp.c index 5dd5f7a..9026e53 100644 --- a/sys/dev/sound/pci/atiixp.c +++ b/sys/dev/sound/pci/atiixp.c @@ -1202,7 +1202,6 @@ atiixp_pci_attach(device_t dev) else sc->polling = 0; - pci_set_powerstate(dev, PCI_POWERSTATE_D0); pci_enable_busmaster(dev); sc->regid = PCIR_BAR(0); @@ -1354,7 +1353,6 @@ atiixp_pci_suspend(device_t dev) value = atiixp_rd(sc, ATI_REG_CMD); value |= ATI_REG_CMD_POWERDOWN | ATI_REG_CMD_AC_RESET; atiixp_wr(sc, ATI_REG_CMD, ATI_REG_CMD_POWERDOWN); - pci_set_powerstate(dev, PCI_POWERSTATE_D3); atiixp_unlock(sc); return (0); @@ -1366,10 +1364,6 @@ atiixp_pci_resume(device_t dev) struct atiixp_info *sc = pcm_getdevinfo(dev); atiixp_lock(sc); - /* power up pci bus */ - pci_set_powerstate(dev, PCI_POWERSTATE_D0); - pci_enable_io(dev, SYS_RES_MEMORY); - pci_enable_busmaster(dev); /* reset / power up aclink */ atiixp_reset_aclink(sc); atiixp_unlock(sc); diff --git a/sys/dev/sound/pci/ich.c b/sys/dev/sound/pci/ich.c index 6fb8809..4895ad6 100644 --- a/sys/dev/sound/pci/ich.c +++ b/sys/dev/sound/pci/ich.c @@ -1192,12 +1192,6 @@ ich_pci_resume(device_t dev) sc = pcm_getdevinfo(dev); - if (sc->regtype == SYS_RES_IOPORT) - pci_enable_io(dev, SYS_RES_IOPORT); - else - pci_enable_io(dev, SYS_RES_MEMORY); - pci_enable_busmaster(dev); - ICH_LOCK(sc); /* Reinit audio device */ if (ich_init(sc) == -1) { |