From 4c61f9036b5bded4d1b3613ef97a32326756af62 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Thu, 27 Feb 2003 07:36:03 +0000 Subject: [PATCH] NODEVFS cleanup: Don't call devsw_{add,delete}(). These two drivers are actually broken, and have been for quite some time. --- sys/i386/isa/istallion.c | 7 +++---- sys/i386/isa/stallion.c | 11 +++-------- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/sys/i386/isa/istallion.c b/sys/i386/isa/istallion.c index 10b292ebc4be..35aa8363d8f1 100644 --- a/sys/i386/isa/istallion.c +++ b/sys/i386/isa/istallion.c @@ -815,10 +815,6 @@ static int stliprobe(struct isa_device *idp) { stlibrd_t *brdp; int btype, bclass; - static int once; - - if (!once++) - cdevsw_add(&stli_cdevsw); #if DEBUG printf("stliprobe(idp=%x): unit=%d iobase=%x flags=%x\n", (int) idp, @@ -919,6 +915,9 @@ static int stliattach(struct isa_device *idp) return(0); if (brdp->state & BST_FOUND) stli_brdattach(brdp); + if (0) { + make_dev(&stli_cdevsw, 0, 0, 0, 0, "istallion_is_broken"); + } return(1); } diff --git a/sys/i386/isa/stallion.c b/sys/i386/isa/stallion.c index 77db37f407b8..1d8c66614528 100644 --- a/sys/i386/isa/stallion.c +++ b/sys/i386/isa/stallion.c @@ -552,14 +552,6 @@ static struct cdevsw stl_cdevsw = { /* kqfilter */ ttykqfilter, }; -static void stl_drvinit(void *unused) -{ - - cdevsw_add(&stl_cdevsw); -} - -SYSINIT(sidev,SI_SUB_DRIVERS,SI_ORDER_MIDDLE+CDEV_MAJOR,stl_drvinit,NULL) - #endif /*****************************************************************************/ @@ -662,6 +654,9 @@ static int stlattach(struct isa_device *idp) brdp->irqtype = stl_irqshared; stl_brdinit(brdp); + if (0) { + make_dev(&stl_cdevsw, 0, 0, 0, 0, "stallion_is_broken"); + } return(1); }