diff options
| author | Coleman Kane <cokane@FreeBSD.org> | 2000-06-23 05:54:01 +0000 |
|---|---|---|
| committer | Coleman Kane <cokane@FreeBSD.org> | 2000-06-23 05:54:01 +0000 |
| commit | 9d2a5442fc039a43ca4374a8bcade3b90597e467 (patch) | |
| tree | 395187865e3d95f60bbc4056ada1abb96f74b254 /sys/dev/tdfx | |
| parent | bb33e42207f96329d22cc640a12e8b693be36a81 (diff) | |
Notes
Diffstat (limited to 'sys/dev/tdfx')
| -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 ad48f9955033..9709fd595345 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 a369897eec41..bbfd3d37a940 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; }; |
