summaryrefslogtreecommitdiffstats
path: root/sys/dev/agp/agp_i810.c
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2007-10-30 22:09:16 +0000
committerjhb <jhb@FreeBSD.org>2007-10-30 22:09:16 +0000
commitfb7d38331162808946b7a5b8403973e269dec20d (patch)
tree4bbfaaad51fa35b2a857b9a295ba0233f3be30ff /sys/dev/agp/agp_i810.c
parent21b82a0c2984db5116c4ae71807cffe53301e89e (diff)
downloadFreeBSD-src-fb7d38331162808946b7a5b8403973e269dec20d.zip
FreeBSD-src-fb7d38331162808946b7a5b8403973e269dec20d.tar.gz
Split agp_generic_detach() up into two routines: agp_free_cdev() destroys
/dev/agpgart and agp_free_res() frees resources like the BAR for the aperture. Splitting this up lets chipset-specific detach routines manipulate the aperture during their detach routines without panicing. MFC after: 1 week Reviewed by: anholt
Diffstat (limited to 'sys/dev/agp/agp_i810.c')
-rw-r--r--sys/dev/agp/agp_i810.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/agp/agp_i810.c b/sys/dev/agp/agp_i810.c
index bd72de5..9e081be 100644
--- a/sys/dev/agp/agp_i810.c
+++ b/sys/dev/agp/agp_i810.c
@@ -583,11 +583,8 @@ static int
agp_i810_detach(device_t dev)
{
struct agp_i810_softc *sc = device_get_softc(dev);
- int error;
- error = agp_generic_detach(dev);
- if (error)
- return error;
+ agp_free_cdev(dev);
/* Clear the GATT base. */
if ( sc->chiptype == CHIP_I810 ) {
@@ -608,6 +605,7 @@ agp_i810_detach(device_t dev)
free(sc->gatt, M_AGP);
bus_release_resources(dev, sc->sc_res_spec, sc->sc_res);
+ agp_free_res(dev);
return 0;
}
OpenPOWER on IntegriCloud