From efd1585a7a1fc285d89a95fe407938394d5f1595 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Sun, 4 Nov 2001 11:50:08 +0000 Subject: [PATCH] Don't call cdevsw_add(). --- sys/alpha/tlsb/zs_tlsb.c | 5 ----- sys/dev/bktr/bktr_os.c | 16 ---------------- 2 files changed, 21 deletions(-) diff --git a/sys/alpha/tlsb/zs_tlsb.c b/sys/alpha/tlsb/zs_tlsb.c index 1e5679bcd2db..0e0a70635c5c 100644 --- a/sys/alpha/tlsb/zs_tlsb.c +++ b/sys/alpha/tlsb/zs_tlsb.c @@ -469,14 +469,9 @@ zsc_tlsb_probe(device_t dev) static int zsc_tlsb_attach(device_t dev) { - static int once = 1; struct zsc_softc *sc = device_get_softc(dev); device_t parent = device_get_parent(dev); - if (once) { - once = 0; - cdevsw_add(&zs_cdevsw); - } bus_generic_attach(dev); /* XXX */ diff --git a/sys/dev/bktr/bktr_os.c b/sys/dev/bktr/bktr_os.c index cc79745a563b..1a3f1525d1d9 100644 --- a/sys/dev/bktr/bktr_os.c +++ b/sys/dev/bktr/bktr_os.c @@ -854,22 +854,6 @@ static struct cdevsw bktr_cdevsw = NULL, -1 }; -static int bktr_devsw_installed; - -static void -bktr_drvinit( void *unused ) -{ - dev_t dev; - - if ( ! bktr_devsw_installed ) { - dev = makedev(CDEV_MAJOR, 0); - cdevsw_add(&dev,&bktr_cdevsw, NULL); - bktr_devsw_installed = 1; - } -} - -SYSINIT(bktrdev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,bktr_drvinit,NULL) - /* * the boot time probe routine. */