From 9a7836a16f0981672108e893e0c46fe8007bb05f Mon Sep 17 00:00:00 2001 From: cg Date: Mon, 5 Mar 2001 17:30:43 +0000 Subject: only mess with the power state on 5.x --- sys/dev/sound/pci/cs4281.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/sound/pci/cs4281.c b/sys/dev/sound/pci/cs4281.c index 41eb810..2f5f633 100644 --- a/sys/dev/sound/pci/cs4281.c +++ b/sys/dev/sound/pci/cs4281.c @@ -769,6 +769,7 @@ cs4281_pci_attach(device_t dev) data = pci_read_config(dev, PCIR_COMMAND, 2); +#if __FreeBSD_version > 500000 if (pci_get_powerstate(dev) != PCI_POWERSTATE_D0) { /* Reset the power state. */ device_printf(dev, "chip is in D%d power mode " @@ -776,7 +777,7 @@ cs4281_pci_attach(device_t dev) pci_set_powerstate(dev, PCI_POWERSTATE_D0); } - +#endif sc->regid = PCIR_MAPS; sc->regtype = SYS_RES_MEMORY; sc->reg = bus_alloc_resource(dev, sc->regtype, &sc->regid, -- cgit v1.1