tdfx_pci.c (102003) | tdfx_pci.c (104111) |
---|---|
1/* 2 * Copyright (c) 2000-2001 by Coleman Kane <cokane@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * | 1/* 2 * Copyright (c) 2000-2001 by Coleman Kane <cokane@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 14 unchanged lines hidden (view full) --- 23 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 24 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 25 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 26 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 27 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 29 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 30 * |
31 * $FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 102003 2002-08-17 02:36:16Z rwatson $ | 31 * $FreeBSD: head/sys/dev/tdfx/tdfx_pci.c 104111 2002-09-28 20:56:32Z phk $ |
32 */ 33 34/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET 35 * 36 * Copyright (C) 2000-2001, by Coleman Kane <cokane@FreeBSD.org>, 37 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor, 38 * and Jens Axboe, located at http://linux.3dfx.com. 39 */ 40 41#include <sys/param.h> 42 | 32 */ 33 34/* 3dfx driver for FreeBSD 4.x - Finished 11 May 2000, 12:25AM ET 35 * 36 * Copyright (C) 2000-2001, by Coleman Kane <cokane@FreeBSD.org>, 37 * based upon the 3dfx driver written for linux, by Daryll Straus, Jon Taylor, 38 * and Jens Axboe, located at http://linux.3dfx.com. 39 */ 40 41#include <sys/param.h> 42 |
43#include <sys/bus_private.h> | |
44#include <sys/bus.h> 45#include <sys/cdefs.h> 46#include <sys/conf.h> 47#include <sys/fcntl.h> 48#include <sys/file.h> 49#include <sys/filedesc.h> 50#include <sys/filio.h> 51#include <sys/ioccom.h> --- 212 unchanged lines hidden (view full) --- 264 } 265 266 /* 267 * make_dev registers the cdev to access the 3dfx card from /dev 268 * use hex here for the dev num, simply to provide better support if > 10 269 * voodoo cards, for the mad. The user must set the link, or use MAKEDEV. 270 * Why would we want that many voodoo cards anyhow? 271 */ | 43#include <sys/bus.h> 44#include <sys/cdefs.h> 45#include <sys/conf.h> 46#include <sys/fcntl.h> 47#include <sys/file.h> 48#include <sys/filedesc.h> 49#include <sys/filio.h> 50#include <sys/ioccom.h> --- 212 unchanged lines hidden (view full) --- 263 } 264 265 /* 266 * make_dev registers the cdev to access the 3dfx card from /dev 267 * use hex here for the dev num, simply to provide better support if > 10 268 * voodoo cards, for the mad. The user must set the link, or use MAKEDEV. 269 * Why would we want that many voodoo cards anyhow? 270 */ |
272 tdfx_info->devt = make_dev(&tdfx_cdev, dev->unit, 0, 0, 02660, 273 "3dfx%x", dev->unit); | 271 tdfx_info->devt = make_dev(&tdfx_cdev, device_get_unit(dev), 272 0, 0, 02660, "3dfx%x", device_get_unit(dev)); |
274 275 return 0; 276} 277 278static int 279tdfx_detach(device_t dev) { 280 struct tdfx_softc* tdfx_info; 281 int retval; --- 588 unchanged lines hidden --- | 273 274 return 0; 275} 276 277static int 278tdfx_detach(device_t dev) { 279 struct tdfx_softc* tdfx_info; 280 int retval; --- 588 unchanged lines hidden --- |