- 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.
This commit is contained in:
John Baldwin 2002-11-08 21:10:53 +00:00
parent 7b3ac8969c
commit e068a87835

View File

@ -27,6 +27,8 @@
* Copyright (c) 2000 Andrew Miklic, Andrew Gallatin, and Thomas V. Crimi
*/
#include "opt_fb.h"
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
@ -63,8 +65,6 @@ __FBSDID("$FreeBSD$");
#include <dev/fb/gfb.h>
#include <dev/gfb/gfb_pci.h>
#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) {