summaryrefslogtreecommitdiffstats
path: root/sys/pci/agp_amd.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2000-06-10 17:53:20 +0000
committerdfr <dfr@FreeBSD.org>2000-06-10 17:53:20 +0000
commitad9c556957d20357dcf3d2212e47527daff4fe87 (patch)
tree23ebc9ab314056d95f5b719c7dec5305fab7c967 /sys/pci/agp_amd.c
parent52b31c00bbaa851d76d91e89090c45135cf24174 (diff)
downloadFreeBSD-src-ad9c556957d20357dcf3d2212e47527daff4fe87.zip
FreeBSD-src-ad9c556957d20357dcf3d2212e47527daff4fe87.tar.gz
Release resources properly in detach.
Diffstat (limited to 'sys/pci/agp_amd.c')
-rw-r--r--sys/pci/agp_amd.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/sys/pci/agp_amd.c b/sys/pci/agp_amd.c
index 16125fb..198b926 100644
--- a/sys/pci/agp_amd.c
+++ b/sys/pci/agp_amd.c
@@ -246,6 +246,11 @@ static int
agp_amd_detach(device_t dev)
{
struct agp_amd_softc *sc = device_get_softc(dev);
+ int error;
+
+ error = agp_generic_detach(dev);
+ if (error)
+ return error;
/* Disable the TLB.. */
WRITE2(AGP_AMD751_STATUS,
@@ -261,6 +266,10 @@ agp_amd_detach(device_t dev)
AGP_SET_APERTURE(dev, sc->initial_aperture);
agp_amd_free_gatt(sc->gatt);
+
+ bus_release_resource(dev, SYS_RES_MEMORY,
+ AGP_AMD751_REGISTERS, sc->regs);
+
return 0;
}
OpenPOWER on IntegriCloud