From a3ae595729fcd63e2be5e4130e05b486a8a58009 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sat, 28 Sep 2002 20:56:32 +0000 Subject: [PATCH] Disabuse this driver of the notion that it needs to include to find the unit from a device_t. Spotted by: FlexeLint --- sys/dev/tdfx/tdfx_pci.c | 5 ++--- sys/dev/tdfx/tdfx_vars.h | 1 - 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index 0530cd8268c..24879bb2356 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -40,7 +40,6 @@ #include -#include #include #include #include @@ -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 890a3e2e222..55bb060ea0d 100644 --- a/sys/dev/tdfx/tdfx_vars.h +++ b/sys/dev/tdfx/tdfx_vars.h @@ -39,7 +39,6 @@ #include #include -#include #include #include