mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
Finish up the fixing of the linux ioctl stuff. Add line to remove the dev
entry upon unload.
This commit is contained in:
parent
bb33e42207
commit
9d2a5442fc
2 changed files with 6 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue