summaryrefslogtreecommitdiffstats
path: root/sys/dev/tdfx
diff options
context:
space:
mode:
authorphk <phk@FreeBSD.org>2002-09-28 20:56:32 +0000
committerphk <phk@FreeBSD.org>2002-09-28 20:56:32 +0000
commitff0f543527f28c0dfa334d8eea737f58f5bcdbb5 (patch)
tree5445349a79deb99e7568d397a71944333638516f /sys/dev/tdfx
parentbfa14f852c898002e1db75406c2ab90abcaf1e78 (diff)
downloadFreeBSD-src-ff0f543527f28c0dfa334d8eea737f58f5bcdbb5.zip
FreeBSD-src-ff0f543527f28c0dfa334d8eea737f58f5bcdbb5.tar.gz
Disabuse this driver of the notion that it needs to include
<sys/bus_private.h> to find the unit from a device_t. Spotted by: FlexeLint
Diffstat (limited to 'sys/dev/tdfx')
-rw-r--r--sys/dev/tdfx/tdfx_pci.c5
-rw-r--r--sys/dev/tdfx/tdfx_vars.h1
2 files changed, 2 insertions, 4 deletions
diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c
index 0530cd8..24879bb 100644
--- a/sys/dev/tdfx/tdfx_pci.c
+++ b/sys/dev/tdfx/tdfx_pci.c
@@ -40,7 +40,6 @@
#include <sys/param.h>
-#include <sys/bus_private.h>
#include <sys/bus.h>
#include <sys/cdefs.h>
#include <sys/conf.h>
@@ -269,8 +268,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?
*/
- tdfx_info->devt = make_dev(&tdfx_cdev, dev->unit, 0, 0, 02660,
- "3dfx%x", dev->unit);
+ tdfx_info->devt = make_dev(&tdfx_cdev, device_get_unit(dev),
+ 0, 0, 02660, "3dfx%x", device_get_unit(dev));
return 0;
}
diff --git a/sys/dev/tdfx/tdfx_vars.h b/sys/dev/tdfx/tdfx_vars.h
index 890a3e2..55bb060 100644
--- a/sys/dev/tdfx/tdfx_vars.h
+++ b/sys/dev/tdfx/tdfx_vars.h
@@ -39,7 +39,6 @@
#include <sys/memrange.h>
#include <sys/param.h>
-#include <sys/bus_private.h>
#include <sys/bus.h>
#include <sys/cdefs.h>
OpenPOWER on IntegriCloud