From eb9c5b7d92abac243d955a5a1397f5f291b1a591 Mon Sep 17 00:00:00 2001 From: jhb Date: Fri, 8 Nov 2002 21:10:53 +0000 Subject: - Move opt_fb.h earlier so it covers included headers. - Update cdevsw. Block majors are out, kqfilters are in. - No need to bzero softc's that we get from new-bus. They come that way to begin with. --- sys/dev/tga/tga_pci.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/dev/tga/tga_pci.c b/sys/dev/tga/tga_pci.c index a1b2ccf..6a78523 100644 --- a/sys/dev/tga/tga_pci.c +++ b/sys/dev/tga/tga_pci.c @@ -27,6 +27,8 @@ * Copyright (c) 2000 Andrew Miklic, Andrew Gallatin, and Thomas V. Crimi */ +#include "opt_fb.h" + #include __FBSDID("$FreeBSD$"); @@ -63,8 +65,6 @@ __FBSDID("$FreeBSD$"); #include #include -#include "opt_fb.h" - static int tga_probe(device_t); static int tga_attach(device_t); static void tga_intr(void *); @@ -110,10 +110,10 @@ static struct cdevsw tga_cdevsw = { /* dump */ nodump, /* psize */ nopsize, /* flags */ 0, - /* bmaj */ -1 + /* kqfilter */ nokqfilter }; -#endif /*FB_INSTALL_CDEV*/ +#endif /* FB_INSTALL_CDEV */ static int tga_probe(device_t dev) @@ -144,7 +144,6 @@ tga_attach(device_t dev) error = 0; unit = device_get_unit(dev); sc = device_get_softc(dev); - bzero(sc, sizeof(struct gfb_softc)); sc->driver_name = TGA_DRIVER_NAME; switch(pci_get_device(dev)) { case DEC_DEVICEID_TGA2: @@ -192,7 +191,7 @@ tga_attach(device_t dev) #ifdef FB_INSTALL_CDEV sc->cdevsw = &tga_cdevsw; sc->devt = make_dev(sc->cdevsw, unit, 0, 0, 02660, "tga%x", unit); -#endif /*FB_INSTALL_CDEV*/ +#endif /* FB_INSTALL_CDEV */ goto done; fail: if(sc->intrhand != NULL) { -- cgit v1.1