summaryrefslogtreecommitdiffstats
path: root/sys/pccard
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2001-07-19 21:43:01 +0000
committerimp <imp@FreeBSD.org>2001-07-19 21:43:01 +0000
commitab53999cee8842b737006169ffcbcfa5e5b125fb (patch)
treecfb9eba23c33bdfc2b83a45a5c45361b21226f95 /sys/pccard
parenta8951818b09d70e544a3c82d3095bac7e89692c0 (diff)
downloadFreeBSD-src-ab53999cee8842b737006169ffcbcfa5e5b125fb.zip
FreeBSD-src-ab53999cee8842b737006169ffcbcfa5e5b125fb.tar.gz
When including pci header files, do things differently for 5x and 4x
to make code sharing between the two easier. Also, only do power management in -current. It doesn't exist in stable yet.
Diffstat (limited to 'sys/pccard')
-rw-r--r--sys/pccard/pcic_pci.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/pccard/pcic_pci.c b/sys/pccard/pcic_pci.c
index 9cb66d4..6fa9fd7 100644
--- a/sys/pccard/pcic_pci.c
+++ b/sys/pccard/pcic_pci.c
@@ -35,8 +35,13 @@
#include <sys/module.h>
#include <sys/systm.h>
+#if __FreeBSD_version < 500000
+#include <pci/pcireg.h>
+#include <pci/pcivar.h>
+#else
#include <dev/pci/pcireg.h>
#include <dev/pci/pcivar.h>
+#endif
#include <pccard/pcic_pci.h>
#include <pccard/i82365.h>
@@ -428,6 +433,7 @@ pcic_pci_probe(device_t dev)
return (ENXIO);
device_set_desc(dev, desc);
+#if __FreeBSD_version > 500000
/*
* Take us out of power down mode.
*/
@@ -437,6 +443,7 @@ pcic_pci_probe(device_t dev)
"-- setting to D0\n", pci_get_powerstate(dev));
pci_set_powerstate(dev, PCI_POWERSTATE_D0);
}
+#endif
/*
* Allocated/deallocate interrupt. This forces the PCI BIOS or
OpenPOWER on IntegriCloud