summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp/agp_amd.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/agp/agp_amd.c')
-rw-r--r--sys/dev/agp/agp_amd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/agp/agp_amd.c b/sys/dev/agp/agp_amd.c
index 3c9159d..7c3bd0d 100644
--- a/sys/dev/agp/agp_amd.c
+++ b/sys/dev/agp/agp_amd.c
@@ -277,11 +277,8 @@ 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;
+ agp_free_cdev(dev);
/* Disable the TLB.. */
WRITE2(AGP_AMD751_STATUS,
@@ -297,6 +294,7 @@ agp_amd_detach(device_t dev)
AGP_SET_APERTURE(dev, sc->initial_aperture);
agp_amd_free_gatt(sc->gatt);
+ agp_free_res(dev);
bus_release_resource(dev, SYS_RES_MEMORY,
AGP_AMD751_REGISTERS, sc->regs);
OpenPOWER on IntegriCloud