diff options
author | cokane <cokane@FreeBSD.org> | 2000-06-23 05:54:01 +0000 |
---|---|---|
committer | cokane <cokane@FreeBSD.org> | 2000-06-23 05:54:01 +0000 |
commit | c75f27a705d87ab5a275304d4a54c4f49b380b9c (patch) | |
tree | a1581b24f407049d2f481c8ed9236ce3f6f0caad | |
parent | a6d911fe4ec44bd192bc844817123acbfbb79fd8 (diff) | |
download | FreeBSD-src-c75f27a705d87ab5a275304d4a54c4f49b380b9c.zip FreeBSD-src-c75f27a705d87ab5a275304d4a54c4f49b380b9c.tar.gz |
Finish up the fixing of the linux ioctl stuff. Add line to remove the dev
entry upon unload.
-rw-r--r-- | sys/dev/tdfx/tdfx_pci.c | 6 | ||||
-rw-r--r-- | sys/dev/tdfx/tdfx_vars.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index ad48f99..9709fd5 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -102,6 +102,7 @@ static device_method_t tdfx_methods[] = { MALLOC_DEFINE(M_TDFX,"TDFX Driver","3DFX Graphics[/2D]/3D Accelerator(s)"); #ifdef TDFX_LINUX +MODULE_DEPEND(tdfx, linux, 1, 1, 1); LINUX_IOCTL_SET(tdfx, LINUX_IOCTL_TDFX_MIN, LINUX_IOCTL_TDFX_MAX); #endif @@ -235,7 +236,8 @@ tdfx_attach(device_t dev) { * voodoo cards, for the mad. The user must set the link, or use MAKEDEV. * Why would we want that many voodoo cards anyhow? */ - make_dev(&tdfx_cdev, dev->unit, 0, 0, 02660, "3dfx%x", dev->unit); + tdfx_info->devt = make_dev(&tdfx_cdev, dev->unit, 0, 0, 02660, + "3dfx%x", dev->unit); return 0; } @@ -258,6 +260,8 @@ tdfx_detach(device_t dev) { if(retval != 0) printf("tdfx: For some reason, I couldn't clear the mtrr\n"); #endif + /* Remove device entry when it can no longer be accessed */ + destroy_dev(tdfx_info->devt); return(0); } diff --git a/sys/dev/tdfx/tdfx_vars.h b/sys/dev/tdfx/tdfx_vars.h index a369897..bbfd3d3 100644 --- a/sys/dev/tdfx/tdfx_vars.h +++ b/sys/dev/tdfx/tdfx_vars.h @@ -89,6 +89,7 @@ struct tdfx_softc { unsigned char dv; struct file *curFile; device_t dev; + dev_t devt; struct mem_range_desc mrdesc; int busy; }; |