diff options
Diffstat (limited to 'sys/i386/isa/gsc.c')
-rw-r--r-- | sys/i386/isa/gsc.c | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/sys/i386/isa/gsc.c b/sys/i386/isa/gsc.c index 9ac7b43..48bd5f2 100644 --- a/sys/i386/isa/gsc.c +++ b/sys/i386/isa/gsc.c @@ -402,6 +402,10 @@ gscprobe (struct isa_device *isdp) struct gsc_unit *scu = unittab + unit; int stb; struct gsc_geom geom = NEW_GEOM; + static int once; + + if (!once++) + cdevsw_add(&gsc_cdevsw); scu->flags = FLAG_DEBUG; @@ -849,22 +853,4 @@ gscioctl (dev_t dev, u_long cmd, caddr_t data, int flag, struct proc *p) } } - -static int gsc_devsw_installed; - -static void -gsc_drvinit(void *unused) -{ - dev_t dev; - - if( ! gsc_devsw_installed ) { - dev = makedev(CDEV_MAJOR, 0); - cdevsw_add(&dev,&gsc_cdevsw, NULL); - gsc_devsw_installed = 1; - } -} - -SYSINIT(gscdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,gsc_drvinit,NULL) - - #endif /* NGSC > 0 */ |