From 93cd41f72d524d0499f2933769a610789437a2d2 Mon Sep 17 00:00:00 2001 From: Peter Wemm Date: Mon, 29 Jan 2001 11:38:39 +0000 Subject: Zap silly #if NPCI > 0 and the hoops that we jump through for the module case. Use an 'and' case in conf/files so that it only gets compiled if pci is present. --- sys/conf/files | 2 +- sys/dev/tdfx/tdfx_pci.c | 9 --------- sys/modules/3dfx/Makefile | 7 +------ 3 files changed, 2 insertions(+), 16 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index f76e6d2b77ad..1b2378c21d29 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -489,7 +489,7 @@ dev/stg/tmc18c30_pccard.c optional stg card dev/stg/tmc18c30_isa.c optional stg isa dev/sym/sym_hipd.c optional sym \ dependency "$S/dev/sym/sym_{conf,defs}.h" -dev/tdfx/tdfx_pci.c optional tdfx +dev/tdfx/tdfx_pci.c optional tdfx pci dev/twe/twe.c optional twe dev/twe/twe_freebsd.c optional twe # diff --git a/sys/dev/tdfx/tdfx_pci.c b/sys/dev/tdfx/tdfx_pci.c index 8339738d4820..d71e9c142e7a 100644 --- a/sys/dev/tdfx/tdfx_pci.c +++ b/sys/dev/tdfx/tdfx_pci.c @@ -38,12 +38,6 @@ * and Jens Axboe, located at http://linux.3dfx.com. */ -/* - * put this here, so as to bail out immediately if we have no PCI BUS installed - */ -#include "pci.h" -#if NPCI > 0 - #include #include @@ -871,6 +865,3 @@ static driver_t tdfx_driver = { /* Tell Mr. Kernel about us! */ DRIVER_MODULE(tdfx, pci, tdfx_driver, tdfx_devclass, 0, 0); - - -#endif /* NPCI */ diff --git a/sys/modules/3dfx/Makefile b/sys/modules/3dfx/Makefile index 5c676213a85b..4973bb4e97dd 100644 --- a/sys/modules/3dfx/Makefile +++ b/sys/modules/3dfx/Makefile @@ -6,12 +6,10 @@ MAINTAINER= cokane@FreeBSD.org KMOD= 3dfx NOMAN= YES -SRCS= opt_tdfx.h pci.h bus_if.h pci_if.h device_if.h tdfx_pci.h tdfx_io.h\ +SRCS= opt_tdfx.h bus_if.h pci_if.h device_if.h tdfx_pci.h tdfx_io.h\ tdfx_vars.h tdfx_pci.c INCSRC= ../../sys -CLEANFILES= pci.h - .if ${MACHINE_ARCH} == "i386" # This line enables linux ioctl handling by default # comment out if you don't want it @@ -21,9 +19,6 @@ TDFX_OPTS= "\#define TDFX_LINUX" # Uncomment this for debugging messages #CFLAGS+= -DDEBUG -pci.h: - echo "#define NPCI 1" > pci.h - opt_tdfx.h: touch opt_tdfx.h echo $(TDFX_OPTS) >> opt_tdfx.h -- cgit v1.2.3